Forum Discussion
Jedahn
3 years agoFrequent Visitor
rolling average
Hello everyone,
I'm creating rolling average for the past 3 months using quick measure but i'm getting the same number for sales every month. 1st screenshot are the columns of my dates in the same table. 2nd screenshot is the result of trying the quick measure. What steps should i take to get the correct rolling average for this? Thank you guys.
1 Reply
- Jihwan_KimSuper User
Hi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Qty 3months rolling avg: = IF ( HASONEVALUE ( 'Calendar'[Year-Month] ), AVERAGEX ( WINDOW ( -2, REL, 0, REL, ALL ( 'Calendar'[Year-Month], 'Calendar'[Year-Month sort] ), ORDERBY ( 'Calendar'[Year-Month sort], ASC ) ), [Qty total:] ) )