Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to Group the following Column (This Should Be Easy For You Guys)

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. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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:

vjialongymsft_0-1720663111845.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

That worked perfectly, thank you!

Anonymous
Not applicable

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:

vjialongymsft_0-1720663111845.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.