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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Orliktom
Frequent Visitor

Logic of two columns in one slicer

Hello, 

 

I have a table where I have two true/false parameters for plan wheter it is "active" and "annual". Plan can be at the same time active and annual. I would like to make a slicer which will select active plans or annual plans. I mean if I select active it will show results where active is true - ignoring if it is annual or not.

 

Thanks

Tomas

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Orliktom 

 

You can create a table 'Plan Type' with only "Active" and "Annual" values in a column. Use this column in a slicer. 

vjingzhang_0-1643792643205.png

 

Then create below measure as a flag. Put it in the filter pane on this table visual and set Value is 1. I attached a demo at bottom. 

Flag = 
IF (
    SWITCH (
        SELECTEDVALUE ( 'Plan Type'[Plan] ),
        "Active", SELECTEDVALUE ( 'Table'[Active] ) = TRUE (),
        "Annual", SELECTEDVALUE ( 'Table'[Annual] ) = TRUE ()
    ),
    1
)

22020201.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Orliktom 

 

You can create a table 'Plan Type' with only "Active" and "Annual" values in a column. Use this column in a slicer. 

vjingzhang_0-1643792643205.png

 

Then create below measure as a flag. Put it in the filter pane on this table visual and set Value is 1. I attached a demo at bottom. 

Flag = 
IF (
    SWITCH (
        SELECTEDVALUE ( 'Plan Type'[Plan] ),
        "Active", SELECTEDVALUE ( 'Table'[Active] ) = TRUE (),
        "Annual", SELECTEDVALUE ( 'Table'[Annual] ) = TRUE ()
    ),
    1
)

22020201.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

amitchandak
Super User
Super User

@Orliktom , if you add two columns to the slicer, it will make a hierarchical slicer, it should divide it into two parts

 

or are looking filter slicer with each other, when they are not from same table ?

https://www.youtube.com/watch?v=cyOquvfhzNM

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello, 

 

currently I have two slicers 

Active - True/False

Annual - True/False

Hierarchical slicer doesnt make sense, it would be better to have two separate filters. Im looking for solution to have slicer Plan - Active/Annual.

 

These are sample data:

Orliktom_0-1643306307096.png

 

Thanks

Tomas

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors