Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
tmorgan93
New Member

Calculate 30 day rolling/moving average for another average

I have a line and stacked column chart showing the average days in process for a ticket by month. I want to add a Y-axis line to show the rolling 30 day average, but the resources I've found generally deal with $ amount sums and not averaging. This is the formula I've been trying, but it still only shows the monthly average that is already indicated by the columns:

 

Rolling Average = AVERAGEX(DATESINPERIOD('Date Table'[DATE], LASTDATE('Weekday'DATE]), -30, DAY), AVERAGE('Ticket table'[Days In Progress]))

 

How can I calculate the 30 day weighted average so I can show it in line form to contrast with the monthly average?

1 REPLY 1
DataInsights
Super User
Super User

@tmorgan93,

 

Here's a great article on moving averages. I recommend creating a measure for Average Days in Progress, and use that measure in the Rolling Average measure. Also, you'll need to clear the date filter context in order to get the last 30 days (the article explains how).

 

https://www.daxpatterns.com/custom-time-related-calculations/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.