Forum Discussion
Moving Average
- 10 years ago
Firstly you need a column of date with full date format. Then you can use calculated measure to get the expected result. Please refer to following steps.
- Create a calculated column for the date.
FullDate = DATE ( 2016, 'Session'[Month of the Year], 1 )
- Create a measure for 3 months moving average. You can change the number of months if you want.
Moving_Average_3_Months = CALCULATE ( AVERAGEX ( 'Session', 'Session'[Sessions] ), DATESINPERIOD ( 'Session'[FullDate], LASTDATE ( 'Session'[FullDate] ), -3, MONTH ) ) - Drag the Line Chart into your canvas as below.
- Create a calculated column for the date.
Hi,
I am trying to calculate moving 3 month average and came across this post. I followed the steps exactly as mentioned in the post but no luck so far. My formula looks like this...
MA_3M = CALCULATE(AVERAGEX('Session', 'Session'[Sessions]), DATESINPERIOD('Session'[FullDate], LASTDATE('Session'[FullDate]),-3,MONTH))
While seeing the results, the Sessions and the Moving average show the same numbers....what am I missing???
Pleae help!
Are you using a calendar table? http://exceleratorbi.com.au/power-pivot-calendar-tables/
- Anonymous9 years agoNot applicable
I have the same problem:
Table with one column as Survey with values 0, 1, -1
Another column as Date, in date format "m/d/Y".
The 3 month moving average is the same as the average. I've tried multiple things but still stumped. :womansad: help?