I have a good measure for moving average that works fine (pasted below) but I am stuck trying to iterate it to a centered moving average. For example, I would like to calculate the MA for previous 2 periods, current period, and next 2 periods to get a centered moving average but I’m stuck with not being clever enough to come up with the proper dax. Anyone have suggestions?
Moving Average Sales = IF( ISBLANK( [Sales] ), BLANK(), AVERAGEX( DATESINPERIOD( Dates[Date], LASTDATE( Dates[Date] ), -3, MONTH ), [Sales] ) )
Thanks for your help!