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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

DAX add column and group other variable as other

I'm currently trying to create a page filter for my "Custom1" column that contains data "COP1" "COP2" and various other names.

 

Rather than have the entire list appear in the dropdown slicer is it possible to create an addcolumn via DAX that gives me values "COP1", "COP2" and "Other"? 

 

i.e. I'm trying to rename all other variables as "Other" in a new column

1 ACCEPTED SOLUTION

@Anonymous ,

 

Custom 1 Sort = IF([Custom_1] = "COP1" || [COLUMN1] = "COP2",[Custom_1], "Other")


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

Custom2 = SWITCH([Custom1],
"COP1" || "COP2",[Custom1],
"Other")


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler An error has appeared :

 

Function 'SWITCH' does not support comparing values of type Text with values of type True/False. Consider using the VALUE or FORMAT function to convert one of the values .

 

Custom 1 Sort = SWITCH([Custom_1],
"COP1" || "COP2",[Custom_1],
"Other")

Sorry @NeilL tried to get too fancy:

Custom2 = SWITCH([Custom1],
"COP1",[Custom1],
"COP2",[Custom1],
"Other")


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Anonymous ,

 

Custom 1 Sort = IF([Custom_1] = "COP1" || [COLUMN1] = "COP2",[Custom_1], "Other")


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.