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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Polo87
Frequent Visitor

Categorize few labels to one option and use it in slicer.

Hi,


I have a case where I need to filter by labels However I need only WON, Lost and Others(Pending) which contains all other labels.
How Could I achieve it?

Polo87_0-1709723969950.png

 

2 ACCEPTED SOLUTIONS

@PowerBigginerHow could I modify it to exclude "Cancelled" label from Pending group? So it should content all labels except WON, LOST and Cancelled

LabelsGroup = 
SWITCH(
    TRUE(),
    'RequestTable-Splitted'[Planner_Labels] = "WON", "WON",
    'RequestTable-Splitted'[Planner_Labels] = "Lost", "Lost",
    'RequestTable-Splitted'[Planner_Labels] = "Cancelled", BLANK(),
    "Pending"
)

Will it work as I described?

EDIT: It will create Blank option with Cancelled label. How to hide it 🙂

View solution in original post

in filter section you can apply not to show blank

PowerBigginer_0-1709796837247.png

 

View solution in original post

3 REPLIES 3
PowerBigginer
Helper II
Helper II

Create New column in your table 

NewLable = SWITCH(TRUE(),tablename[Win_Status] = "WON","WON"
,tablename[Win_Status] = "Lost","Central","Pending")
Use this column in slicer

If it helps, Please Mark as a solution!

 

For more Power BI Tips & Trick visit my blog https://powertipstricks.blogspot.com/

Thanks In Advance!

@PowerBigginerHow could I modify it to exclude "Cancelled" label from Pending group? So it should content all labels except WON, LOST and Cancelled

LabelsGroup = 
SWITCH(
    TRUE(),
    'RequestTable-Splitted'[Planner_Labels] = "WON", "WON",
    'RequestTable-Splitted'[Planner_Labels] = "Lost", "Lost",
    'RequestTable-Splitted'[Planner_Labels] = "Cancelled", BLANK(),
    "Pending"
)

Will it work as I described?

EDIT: It will create Blank option with Cancelled label. How to hide it 🙂

in filter section you can apply not to show blank

PowerBigginer_0-1709796837247.png

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.