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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

advanced SWITCH usage

Hello,

I am using switchs like this to dynamically change my columns in a table:

 

 

-1 = 
SWITCH(
[Selected Measure],
1,[Users_M1],
2,[Users_Q1],
3,[Users_Y1]
)

-2 = 
SWITCH(
[Selected Measure],
1,[Users_M2],
2,[Users_Q2]
)

-3 = 
SWITCH(
[Selected Measure],
1,[Users_M3],
2,[Users_Q3]
)

 

 

my measure switch table

Capture.PNG

1) How can i add no columns if there is no values or column doesn't exists ? (year -2 and year-3 doesn't exists)
2) How can i dynamically rename the column name in my table "-1" to "-1 Month" if the selection is 1 or "-1 Quarter" if the selection is 2 ?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

If you're talking about raw tables in PBI, then they must be static out of necessity. You can't change them on the fly. Easy as that. If you're talking about visuals... then some of the functionalities might not be available, either. For instance, I don't think you can dynamically change the headers of a column in a matrix or table visual.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

If you're talking about raw tables in PBI, then they must be static out of necessity. You can't change them on the fly. Easy as that. If you're talking about visuals... then some of the functionalities might not be available, either. For instance, I don't think you can dynamically change the headers of a column in a matrix or table visual.

amitchandak
Super User
Super User

@Anonymous ,

1. I think you need to have a default value in case of measure slicer

2. You can rename title , I doubt you can rename column based on selection

 

also refer
measure slicer
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern
https://www.youtube.com/watch?v=vlnx7QUVYME

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

@amitchandak i have already a default mesure ans i return dynamicaly thetable n'aime with another measure. Thank toi for tour Reply.

 

@Anonymous Hello, in fact i would like a Dynamic column name shown in m'y Matrix visual depending on my selection.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.