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! It's time to submit your entry. Live now!
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?
| User | Count |
|---|---|
| 56 | |
| 41 | |
| 38 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 140 | |
| 102 | |
| 64 | |
| 36 | |
| 35 |