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! It's time to submit your entry. Live now!
How do you create a moving, or rolling, average in Power Query? I already know how to do this in DAX, Excel, and Power BI, but I need to know how in Power Query. Mainly because I need to use the resulting column in with other calculations.
How could I do this on the example columns below? I have a date column and random values in the second. What would a 7 day moving average formula look like in Power Query M?
Thank you!
Date Value
1/1/2021 0.888073856
1/2/2021 0.087243733
1/3/2021 0.597531606
1/4/2021 0.25492501
1/5/2021 0.836644673
1/6/2021 0.253785258
1/7/2021 0.757333787
1/8/2021 0.958886707
1/9/2021 0.598108137
1/10/2021 0.180565909
1/11/2021 0.788755716
1/12/2021 0.888126908
1/13/2021 0.231740519
1/14/2021 0.107410191
1/15/2021 0.648458581
1/16/2021 0.582213204
1/17/2021 0.191300599
1/18/2021 0.864502562
1/19/2021 0.583108477
Solved! Go to Solution.
@jsflint
This question was answered over here:
https://community.powerbi.com/t5/Power-Query/Exponential-Moving-Average-in-Power-Query-M/m-p/1897358...
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
't really understand what's going on in that example for the Rolling Average, hard to understand
M is, no doubt, capable of processing data this way but is not inherently designated for such things.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Ok thanks. Now a follow up question. Is it possible to build an exponential moving average, of the same duration, off the simple moving average?
@jsflint
This question was answered over here:
https://community.powerbi.com/t5/Power-Query/Exponential-Moving-Average-in-Power-Query-M/m-p/1897358...
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Ok, but what if I want to reset the average every month..??
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 18 | |
| 13 | |
| 9 | |
| 8 | |
| 8 |