Forum Discussion
moving monthly average
Assuming you have a datekey in your datetable., you should still be able to slice by finanical year.
I usually create my rolling averages like this:
1. Create a total sales measure: SalesQty = CALCULATE(SUM(SalesTable[Sales]]))
2. Qty12M Months (act) = CALCULATE([SalesQty],DATESINPERIOD(DateTable[DateKey],LASTDATE(DateTable[DateKey]),-12,MONTH))
Or for a 6 month moving average
Qty6M Months (act) = CALCULATE([ActualHeadcountSUM],DATESINPERIOD(DateTable[DateKey],LASTDATE(DateTable[DateKey]),-6,MONTH))
Hope this helps.
- sdmikejr9 years agoHelper I
Well, it is kind of working, but even if I start the month at the first month of the fiscal year, it is still taking all dates available to the data model into account. Please let me know if there is something I may be doing wrong?
- Anonymous9 years agoNot applicable
Hi sdmikejr,
Can you provide some detail info about this? (e.g. your table' structure, sample data)
Regards,
Xiaoxin Sheng