Forum Discussion
Anonymous
4 years agoNot applicable
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.
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!
Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
2 Replies
- Jihwan_Kim
Super User
Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
- v-henryk-mstf
Community Support
Hi Anonymous ,
See if the following related blogs are helpful to you.
Rolling Averages In Power BI - AbsentData
If the problem is still not resolved, please point it out. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.