Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Calculating rolling averages and comparisons

Hello,

I am trying to create measures for rolling averages. 
I was able to calculate the rolling average for the last 4 weeks by using this DAX:

4wk =
AverageX(DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]), -1, MONTH ),
CALCULATE(SUM(Datagrunnlag[Verdi])))
 
Now, I'd like to compare this with the rolling average for the 4 weeks before that and haven't found any solutions to this...

Also, I'd like to calculate a 3 month rolling average and compare this with the rolling average for the 3 previous months before that.
 
Any help is well received and appreciated!

2 Replies