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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
cristianml
Post Prodigy
Post Prodigy

Change column based on selection

Hi,

 

I need help to create a measure that allow me to change column based on the selection.

I created the following but not sure if the logic is correct:

 

Category Selection =
SWITCH(TRUE(),
SELECTEDVALUE(Category[Category])="Market",SELECTEDVALUE('List MU'[Market]),
SELECTEDVALUE(Category[Category])="Market Unit",SELECTEDVALUE('List MU'[Market Unit]),
SELECTEDVALUE(Category[Category])="Client Classification",SELECTEDVALUE('List Master Client'[Client Classification]),
SELECTEDVALUE(Category[Category])="CG",SELECTEDVALUE('List CG'[CG]),
SELECTEDVALUE(Category[Category])="SG",SELECTEDVALUE('List SG'[SG]),
SELECTEDVALUE(Category[Category])="FY&Q",SELECTEDVALUE('Calendar'[FY & Q]),
SELECTEDVALUE(Category[Category])="Month",SELECTEDVALUE('Calendar'[Month Name]))
 
Category Column:
cristianml_0-1652227812772.png

 

Hope you can help me.

Thanks.

 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@cristianml , if you trying to change axis, measure will not work

 

refer these aproches

 

Axis Slicer
Three approches from Guyinacube https://www.youtube.com/watch?v=dYmzb5UMkXw
Dynamically change chart axis in Power BI
bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
https://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

 

 

If you need a measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://www.youtube.com/watch?v=vlnx7QUVYME

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@cristianml , if you trying to change axis, measure will not work

 

refer these aproches

 

Axis Slicer
Three approches from Guyinacube https://www.youtube.com/watch?v=dYmzb5UMkXw
Dynamically change chart axis in Power BI
bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
https://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

 

 

If you need a measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://www.youtube.com/watch?v=vlnx7QUVYME

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.