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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Switch Column Headers in Matrix Visual

Hi Team,

 

I have the below 3 Columns in my data.   

 

OrderidAgeSlabUpdatedAge slab
120+ Days0-1Days
220+ Days2-5Days
311-19Days0-1Days
411-19Days2-5Days
58-10Days0-1Days
68-10Days2-5Days
76-7Days0-1Days
86-7Days2-5Days
92-5Days0-1Days
102-5Days2-5Days
110-1Days0-1Days

 

I need to give a user a flexibility to choose between AgeSlab and UpdatedAgeSlab in a matrix visual.

 

The slabs go in the colum header and the values will be Count(orderid).

 

I tried the below dax for creating a calculated column with a supporting table created.

 

if(selectedvalue(supporttable[column1])="Created",table1[AgeSlab],table1[UpdatedAgeSlab])

but this is not working.

 

Any help on this please.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , If want change axis, row/column or legend. You have three options

bookmarks, unpivot and one option in direct query

 

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://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@amitchandak  thanks for this. Yup these helped me to choose the better option.

amitchandak
Super User
Super User

@Anonymous , If want change axis, row/column or legend. You have three options

bookmarks, unpivot and one option in direct query

 

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://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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