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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.