Forum Discussion
LearnPowerBIAS
3 years agoFrequent Visitor
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 - ...
LearnPowerBIAS
3 years agoFrequent Visitor
I created a calculated coulmn using this formula Names = SWITCH(Table[Names], 1, "AA", 2,"BB", 3, "CC", 4, "DD", 5, "EE")
TaylorPBI21
3 years agoResolver I
Hi LearnPowerBIAS,
Here is the correct version of this SWITCH statement...😎
Names = SWITCH(
TRUE(),
Table[Names] = 1, "AA",
Table[Names] = 2, "BB",
Table[Names] = 3, "CC",
Table[Names] = 4, "DD",
Table[Names] = 5, "EE"
)
I am only ammending the DAX I don't know the specifics of your problem, could you give an example table and then the result you'd expect? Or does this solve your problem or give you a better clue on how to solve it? 😊