The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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. ?
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?
I created a calculated coulmn using this formula Names = SWITCH(Table[Names], 1, "AA", 2,"BB", 3, "CC", 4, "DD", 5, "EE")
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? 😊
What about the other questions? How about sharing some screenshots?
Here for 2,3 also I need to return the values. But now its coming as empty . This is a TAble visual.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
19 | |
18 | |
14 |
User | Count |
---|---|
42 | |
35 | |
24 | |
20 | |
20 |