Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I cannot find a solution to this issue. I have a column called "ExtractedText", and every value in this column is one of the following values: (Blank), 00, 01, 10, 20, 21, 30, 31, 40, 41, 50, 60, 70, 80, 90. I need to group my rows using this column as follows:
(Blank) = Blank
00, 20, 21 = Direct
10, 30, 31, 40, 41 = Indirect
50 = RTDI
60, 70 = SG&A
80, 90 = Corp
When all is said and done, I need a slicer that slices the data 5 ways by Blank, Direct, Indirect, RTDI, SG&A, and Corp. Let me know if you have any questions. This should be simple for regular PowerBI users but is difficult for a new user like myself. Thank you.
Solved! Go to Solution.
Hi @Anonymous
Please try the following DAX:
Column = SWITCH(TRUE(),
[ExtractedText] = BLANK(),"Blank",
[ExtractedText] IN { "00" , "20" , "21"} , "Direct",
[ExtractedText] IN {"10" , "30" , "31" , "40" , "41"}, "Indirect",
[ExtractedText] IN {"50"} , "RTDI",
[ExtractedText] IN {"60" , "70"} , "SG&A",
[ExtractedText] IN {"80" , "90"} , "Corp","other")
Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That worked perfectly, thank you!
Hi @Anonymous
Please try the following DAX:
Column = SWITCH(TRUE(),
[ExtractedText] = BLANK(),"Blank",
[ExtractedText] IN { "00" , "20" , "21"} , "Direct",
[ExtractedText] IN {"10" , "30" , "31" , "40" , "41"}, "Indirect",
[ExtractedText] IN {"50"} , "RTDI",
[ExtractedText] IN {"60" , "70"} , "SG&A",
[ExtractedText] IN {"80" , "90"} , "Corp","other")
Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 20 | |
| 13 | |
| 11 |