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
Hello all,
I have a measure that calcualtes Prior year sales. When I am trying to calculate Rolling 4 week average of Prior Year sales its not working. I dont know what mistake I am doing.Please help.
Here are my calculations:
Prior Year Sales=
@Anonymous , Try these measure with week or week rank. For week rank refer my blog
1 year back rolling 4 =
var _week = maxx(allselected(Date), Date[WEEK])
var _year = maxx(allselected(Date), Date[Year])
return
CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year]=_year-1 && 'Date'[Week] <= _week && && 'Date'[Week] >= _week -4))
or
1 year back rolling 4 =
var _week = maxx(allselected(Date), Date[WEEK RANK])
var _year = maxx(allselected(Date), Date[Year])
return
CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Year]=_year-1 && 'Date'[Week RANK] <= _week && && 'Date'[Week RANK] >= _week -4))
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
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 |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 24 | |
| 20 | |
| 20 | |
| 14 | |
| 14 |