Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Dear community,
I reproduced an issue I face on rolling average calculation:
I want to calculate a rolling average on 3 months in a table of 12 months and twelve values:
I have a calendar table.
Here is my basic table and the expected average calculated in Excel: so the first 20 is the average of 10,20,30 and etc...
Here is my formula of the rolling average:
Measure value test:
I don't understand why there are these tiny differences.
If someone has an idea that would be great.
Thanks in advance.
Dominique
Solved! Go to Solution.
Thanks Daniel, WINDOW function works fine in the table. Now my real dataset is not a table but a measure so it's a different approach. I will try to find the solution with what you gave me.
Thanks again for your help.
Hi Daniel,
Thanks for your answer.
Here we go: .pbix and RAW file
Tell me if you see something wrong.
Thanks a lot for your help.
Dominique
while still investigating the issue,
you can use this measure :
new measure =
var s =
SUMX(
WINDOW(
-2,REL,
0,REL,
SUMMARIZE(allselected(RAW),RAW[month],RAW[value]),
ORDERBY(RAW[month], ASC)
),
RAW[value]
)
return s / 3
Thanks Daniel, WINDOW function works fine in the table. Now my real dataset is not a table but a measure so it's a different approach. I will try to find the solution with what you gave me.
Thanks again for your help.
Sure but I can't see how to load the file
User | Count |
---|---|
122 | |
69 | |
67 | |
58 | |
52 |
User | Count |
---|---|
183 | |
92 | |
67 | |
62 | |
52 |