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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors