Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Dear all,
I'm new to Power BI and this community. While exploring how to calculate moving average of a simple dataset, I came across an unexpected result that I could not explain.
The data is simple: a sales table with an amount and date column. I subsequently created a calendar table and did a moving average calculation (found online, see green box below). However, when the "summarize" part of the code was brought out as a variable, the calculation gave an unexpected result (see red box below).
However, i'm not sure the second measure gave unexpected values.
Any pointers or link to the relevant topic of why this is so, will be greatly appreciated.
Thank you very much!
Rgds,
Jinxiang
The difference comes from the way CALCULATE and SUMMARIZE interact.
Here's an excellent article that describes the basic idea
https://www.sqlbi.com/articles/row-context-and-filter-context-in-dax/
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |