I’m not getting the correct answer with this formula below .What I am trying to get is just 3 months MA Average .
Sales 3M MA =
So , What I did was create measure below
Sales Last 2M = CALCULATE([Total Sales],DATEADD(Dates[Date],-1,MONTH))
Sales Last 3M = CALCULATE([Total Sales],DATEADD(Dates[Date],-2,MONTH))
Total Sales = SUM(Sales[Line Total])
Then I added this 3 .
Roling 3 month sales = [Total Sales]+[Sales Last 2M]+[Sales Last 3M]
Then Divided by 3 ,
Sales 3M MA AK = [Roling 3 month sales]/3
Is there a better way to do this , so I if Im doing for 6 months Moving Average - I dont need to create 6 measure and add them then divide 6 .