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
Anonymous
Not applicable

6 Month Rolling Average/Median Help

Hello,

I am trying to figure out how to create a 6 month rolling average and/or median. I have one dataset I am working with. I have a measure for the total number of pieces and the sum for the total price. What I am trying to find is what is the rolling average price for pieces are. 

 

Appreciate any help that can be provided. 

 

Thanks!

 

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Anonymous 

try like:

6MonthAvg =
CALCULATE(  
    DIVIDE([PriceTotal], [PieceTotal]),
    DATESINPERIOD(
        'Date'[Date],
        MAX('Date'[Date]),
        -6,MONTH
    )
)
 
this is a measure to be plotted with the date[date] column

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi @Anonymous 

try like:

6MonthAvg =
CALCULATE(  
    DIVIDE([PriceTotal], [PieceTotal]),
    DATESINPERIOD(
        'Date'[Date],
        MAX('Date'[Date]),
        -6,MONTH
    )
)
 
this is a measure to be plotted with the date[date] column

Hi,  Need help with the following question 

For each product, create data as a moving average of the last 4 months.

For example: United States 37101 April, May, June, July are 1683,1668,776,1885. Predict Aug as Average of the 4, then use average of May, June July, Aug as September.  And a slider that can be used to do -20% to +20%.  Where we cn check forecast  in case we go -1% of the moving average or 5% of the moving average.

Thanks

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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