2 Replies Latest reply on Nov 2, 2018 2:55 AM by Yun Feng

# How to calculate average value of each group based on date range?

Hi

I have data like this:

标题 1标题 2标题 3
DATEPRODUCTVALUE
20180101A1
20180102A2
20180103A3
20180101B5
20180102B6
20180103B7

I have put the DATE in the filter, if I select range from 20180102 to 20180103, how to get the average value of A and B which are: (2 + 3)/2 = 2.5 and (6+7)/2 = 6.5?

Thanks!

• ###### 1. Re: How to calculate average value of each group based on date range?

Hi Yun,

Drag Product to Rows

and

Value to Text in marks sections

In marks section you will get SUM(Value) --> Right Click on It --> Aggregation --> Select "Average"

Drag date field to text and change the filter as per your need automatically you will get the average for each product

Hope this helps, Plz mark this answer as correct or helpful to close the thread

BR,

NB

1 of 1 people found this helpful
• ###### 2. Re: How to calculate average value of each group based on date range?

Thanks! If I put the PRODUCT and DATE in the filter and plot bar of each value of the product, do you know how can I put the average value in the title which if I change date range, the average value change? Thanks!