Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average over the past 3 months

Hey everyone,

I have got the sales for each day since the beginning of the year.

I would like to calculate the average sales per month over the last 3 months.

I want to use a set analysis like :

sum ({<[Month_year]= {[Month_year] > Addmonths( CurrentMonthYear,-3)}>}  [Sales])

Of course, this syntaxe doesn't work. any idea ?  

3 Replies
migueldelval
Specialist
Specialist

Hi Laura,

Try with

rangeavg(Above(sum( [Sales]),0,3)

Regards

Miguel del Valle

Not applicable
Author

Hi Miguel, thanks for your reply.

It doesn't work because I don't have the month in dimension of my graph (and I don't want it).

I just have a table with

Store   AvgSales per month over the past 3 months

A                  33

B                  30

C                  16

Anonymous
Not applicable
Author

=sum({<[Month_year]={">=$(=AddMonths(max(total [Month_year]),-2))"} >} value)