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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
akfir
Helper V
Helper V

rolling average/sum of weekly sales

Capture.PNG
i wish to create a weekly rolling average measure.
My sales data is daily and contains sales of 2018-2019 (accumulative).
notice that last x weeks could contain the last of 2018 and the first of 2019 (sorting issues)
Thanks!!

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @akfir 

 

Try something like.

Measure 8 = 
CALCULATE(
    AVERAGEX( VALUES( 'Calendar'[Date] ), [Sales] ), -- or AVERAGE( Sales[Quantity] )
    DATESINPERIOD( 'Calendar'[Date], MAX( 'Calendar'[Date] ), -7, DAY )
)
Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.