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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
We have a table which calculates a measure per day based on the value of a few columns. Now we want to smooth out the measure to show the trend over time. We tried to use the moving average formula and it throws error with aggregation function as only the table columns can be used there.
Is this even possible to do in power BI desktop? If not, we'll have to export the data out and caclulate somewhere else? Any ideas how to do this?
Thanks for any help on this.
-Amyee
@springday Read this post to get your answer quickly. If you share some sample data, it will help to get you the solution.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Here's the sample table.
Date ID Level Speed Status
| ||||||||||||||||||||||||||||||
dci = level/ ( median speed when status is 1 + median speed when status is 0)
|
Hi @springday ,
Maybe you can try this measure:
dci =
VAR x =
CALCULATE(
MEDIAN(Sheet1[Speed]),
FILTER(
Sheet1,
Sheet1[Status] = 1
)
)
VAR y =
CALCULATE(
MEDIAN(Sheet1[Speed]),
FILTER(
Sheet1,
Sheet1[Status] = 0
)
)
VAR z =
CALCULATE(
x+y,
ALL(Sheet1[Level])
)
RETURN
DIVIDE(
MAX(Sheet1[Level]),
z
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hmm..., it doesn't seem to sovle the moving average problem. Back to my original question, does Power Bi support moving average of a measure?