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

Applying filter inside IF ELSE condition

Hi @jdbuchanan71@Zubair_Muhammad@Greg_Deckler , @parry2k 

I have a requirement like below,

I have a table (Employee) with 10 people in the Names field like below. Now in the report, I need a slicer with only 2 values.

1 is Include All Names - When I clicked on this option all the names in the table should display.

2 is Exclude Kapil- When I clicked on this option all the names in the table should display except Kapil. Can you please help me with this?

Name
Ajay
Bhanu
Chaitu
Siva
Sundar
Sai
Kapil
Vishnu
Vinod
Sasi
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Anonymous 

Add a column to your table with the grouping you want.  Then put that column in your slicer.  You would just turn Kapil off to exclude them from the report, turn Kapil on to include all.

 

Name Group
Ajay Other
Bhanu Other
Chaitu Other
Siva Other
Sundar Other
Sai Other
Kapil Kapil
Vishnu Other
Vinod Other
Sasi Other

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

@Anonymous 

Add a column to your table with the grouping you want.  Then put that column in your slicer.  You would just turn Kapil off to exclude them from the report, turn Kapil on to include all.

 

Name Group
Ajay Other
Bhanu Other
Chaitu Other
Siva Other
Sundar Other
Sai Other
Kapil Kapil
Vishnu Other
Vinod Other
Sasi Other

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.