Forum Discussion
DAX in SWITCH
Hi Friends,
Need urgent help.
I have a column in DB with numbers,
| Names |
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
But in UI those numbers are linked to Names likes
1 -AA
2 - BB
3 - CC
4 - DD
5 - EE
I need to show the names in Table visual not the numbers; So in this case i wrote SWITCH function DAX but the result is
| Names | Names |
| 1 | AA |
| 2,3 | |
| 3 | CC |
| 4 | DD |
| 4,5 |
How to show if they select multipe values in Names coulmns . Please help. TIA
DAX I used:
Names = SWITCH(Names, 1, "AA", 2,"BB", 3, "CC", 4, "DD", 5, "EE")
How to modify this. ?
5 Replies
- tamerj1Community Champion
can you be more specific about the switch statement. Is it applied to a calculated column or measure? Which column/table is involved in this formula? Whi column/table is used in the slicer? How does the report look like?
- LearnPowerBIASFrequent Visitor
I created a calculated coulmn using this formula Names = SWITCH(Table[Names], 1, "AA", 2,"BB", 3, "CC", 4, "DD", 5, "EE")
- tamerj1Community Champion
What about the other questions? How about sharing some screenshots?