Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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

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 ?

  • Anonymous's avatar
    Anonymous
    5 years ago

    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.

3 Replies