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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sdas028
Helper I
Helper I

Date slicer changing chart axis

Hi, I need help figuring out how to change the date axis on a clustered column chart based on the date that the slicer is selected on. For example: I have a clustered column chart that has total cost of each production area by isoweek and I would like it to be able to change based on the week number that the slicer is and then compare it to the week before i.e. if slicer is on week 32 then clustered column chart is week 32 and week 31 - is this possible? Basically I want to be able to compare the week selected with the previous week

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @sdas028,

 

Based on my test, we can create the measure to meet your requirement.

 

pr1week = CALCULATE(SUM('Table'[am]),FILTER(ALL('Table'),'Table'[weeknum]=SELECTEDVALUE('Table'[weeknum])-1))

Then we can get the result as we excepted.

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/t3riwx1tao9gd4v/week.pbix?dl=0

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @sdas028,

 

Based on my test, we can create the measure to meet your requirement.

 

pr1week = CALCULATE(SUM('Table'[am]),FILTER(ALL('Table'),'Table'[weeknum]=SELECTEDVALUE('Table'[weeknum])-1))

Then we can get the result as we excepted.

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/t3riwx1tao9gd4v/week.pbix?dl=0

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi Frank,

 

Thanks very much for that. I ended up changing the way my report was laid out so no longer required it for this, however, I will keep this in the back of my mind if I ever need to do it again! 

 

Thanks,

Sophie

Hi @sdas028,

 

If you feel that makes sense, kindly mark my answer as a solution to cloese the case please.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

 Hi Frank,

 

As this is wasn't the solution I used I didnt think marking it as the solution was correct. However, I have now done so for your convenience.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.