I have monthly results that I need to present as a 3 month rolling average, sometimes at a monthly level and sometimes as a sum of the 3 month rollling average for the quarter/year.
At the monthly level I've found the below formula to work well:
3-Mo Rolling Avg = CALCULATE([Market Performance], DATESINPERIOD(Calendar_Lookup[date], MAX(Calendar_Lookup[date]), -3, MONTH))
/ CALCULATE(DISTINCTCOUNT(Calendar_Lookup[Year_Month]), DATESINPERIOD(Calendar_Lookup[date], LASTDATE(Calendar_Lookup[date]), -3, MONTH))
But, when I show quarterly or annual results it shows one 3 month average instead of a sum of the 3 month averages for the period. How would you solve this?
The options I can see are:
Create a column in either Power Query or DAX that holds the 3 month averages so then I can SUM them as needed? Any advice on how to do this?
Figure out how to do a SUM of a measure. Any advice on how to do this?
Build a series of measures at the monthly, quarterly and annual level. Not a great solution as it doesn’t allow me to work fast when performing analysis because I have to be careful of pulling the right measure.
Any advice would be appreciated! Thanks!