Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
I've created the measure "Balance" that i'm showing in a line graph like so :
Now i'm trying to make the same type of graph but with the averaged "Balance" for a 3 month roll, like so :
So the first marker to show on the graph would be the average of "Balance" for January, February and March.
The second marker would be the average of "Balance" for February, March and April.
And so on.
Can you help me out with that please ? I found the new DAX formula MOVINGAVERAGE on the microsoft site, but I can't use it in my version of pbi desktop even after the update.
Thank you very much
Solved! Go to Solution.
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/
Thank you very much danextian.
That's exactly what i needed.
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/
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |