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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a simple formula that's meant to find the moving average for the number of weeks as selected from a slicer. My problem is that it is changing the scale on my x axis. When I select a 2 month moving average the x axis extends one week to the right, and when I select a 12 week moving average it extends the x asix 11 weeks to the right. Please can anyone explain why it's doing this and how to stop it?
Revenue (adjustable weeks moving average) =
VAR
MovingAverageEndWeek = max('Calendar - Days'[Calendar Date (week bins)])
VAR
MovingAverageStartWeek = MovingAverageEndWeek - 7*(selectedvalue('Selected Integers'[Integars])-1)
RETURN
CALCULATE([Revenue],
'Calendar - Days'[Calendar Date (week bins)] >= MovingAverageStartWeek &&
'Calendar - Days'[Calendar Date (week bins)] <= MovingAverageEndWeek)
Thanks,
CM
Hi @CloudMonkey ,
Sorry but I cant reproduce your scenario ,could you pls upload some screenshots to make it more clear?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 103 | |
| 66 | |
| 65 | |
| 56 |