Forum Discussion
AnthNC
2 years agoHelper II
Measure - Rolling average
Hi everyone! Can you help me out with a rolling (or moving ?) average formula please ? Here is the pbix file :https://drive.google.com/file/d/1tD0vPXoF9NbRuan487Rv9wdFiCuneq7v/view?usp=sharing ...
- 2 years ago
hI AnthNC ,
As one of the best practices, create a separate calendar/dates table. Relate that to your fact table and create this measure:
Avg Balance R3M = CALCULATE ( AVERAGEX ( ALL ( 'Calendar'[Year], 'Calendar'[Month] ), [Balance] ), DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), - 3, MONTH ) )Please attached file for the details and to this link for further explanation -https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
AnthNC
2 years agoHelper II
Thank you very much danextian.
That's exactly what i needed.