Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have been stumped for days on this one. Please help. Below is an example of the table I am working from.
I am needing to create a rolling 7 day average of sales, and plot that on a graph. <-- This part I have been able to do with the below Columns:
Sales Rolling 7 Day =
CALCULATE (
SUM (Daily[Sales (Daily)]),
DATESINPERIOD ( 'Daily'[Date], LASTDATE ( 'Daily'[Date] ), -7, DAY ),
ALLEXCEPT ( Daily, Daily[Sales (Daily)]) )
)
THEN:
Avg. Sales Rolling 7 Day = [Sales Rolling 7 Day]/7
This part works, and I am able to look at total sales at a rolling 7 day avg. view. The problem occurs when I try to add a slicer to the page (Product_ID). When I try to filter the graph by product_ID, it does not show rolling 7 avg. for just that Product_ID, it continues to show the total. Any help would be appreciated. Thanks!
Solved! Go to Solution.
Hi @ddetzler,
Please modify your formula like below.
Sales Rolling 7 Day =
CALCULATE (
SUM ( 'Daily'[Sales] ),
DATESINPERIOD ( 'Daily'[Date], LASTDATE ( 'Daily'[Date] ), -7, DAY ),
VALUES ( Daily[Product_ID] )
)
Then you could get your desired output.
Hope this can help you!
Best Regards,
Cherry
Hi @ddetzler,
Please modify your formula like below.
Sales Rolling 7 Day =
CALCULATE (
SUM ( 'Daily'[Sales] ),
DATESINPERIOD ( 'Daily'[Date], LASTDATE ( 'Daily'[Date] ), -7, DAY ),
VALUES ( Daily[Product_ID] )
)
Then you could get your desired output.
Hope this can help you!
Best Regards,
Cherry
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 80 | |
| 59 | |
| 51 | |
| 46 |