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
Dalen
Frequent Visitor

MULTIPLE FILTERS WITH OR CONDITION

Hi Everyone,

 

I have been looking for a way to make a custom slicer that filters on AND instead of OR, so far unsuccessfully. Below is some example data to further describe what I am looking for. 

 

Base Data:

Name

Apples

Oranges

Bananas

Pears

Vendor 1

TRUE

FALSE

TRUE

FALSE

Vendor 2

FALSE

FALSE

TRUE

TRUE

Vendor 3

FALSE

TRUE

FALSE

FALSE

Vendor 4

TRUE

TRUE

TRUE

FALSE

Vendor 5

TRUE

TRUE

TRUE

TRUE

 

Now I want to be able to use one slicer instead of 5 different one built on AND conditions when I am looking for a Vendor that fulfils all criteria’s inserted. E.g. If i am looking for a vendor that sells all fruits then only vendor 5 should remain in my results. Is there some way to build a custom slicer in Power BI which then can communicate with the other Slicers to filter the data? 

 

I've also tried to change the data structure to:

Name

Fruits

Vendor 1

Apples

Vendor 1

Bananas

Vendor 2

Bananas 

Vendor 2

Pears

etc

etc

 

And only apply a Slicer on Fruits. This however still operates with an OR command and will keep all vendors that fulfils at least one of the criteria’s, while I want to have an AND command for multiple columns. 

 

The custom slicer I want to build would look something like:

Fruits

Filter AND?

Apples

TRUE

Oranges

TRUE

Bananas 

FALSE

Pears

FALSE

 

Which should return Vendor 4 & 5 in my map.


Is there any solutions to this? 

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Dalen ,

 

There is a workaround. Please download the demo from the attachment. 

1. Add a new column to connect two fields.

2. Create a new table.

3. Create a new measure as a Flag.

Flag =
IF (
    ISFILTERED ( FruitStatus[Column] )
        && CALCULATE ( COUNT ( Table1[Column] ), ALL ( Table1[Fruit], Table1[Value] ) )
            = CALCULATE ( COUNT ( FruitStatus[Column] ), ALLSELECTED ( FruitStatus[Column] ) ),
    1,
    BLANK ()
)

MULTIPLE-FILTERS-WITH-OR-CONDITION

 

 

Best Regards,

Community Support Team _ Dale
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

1 REPLY 1
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Dalen ,

 

There is a workaround. Please download the demo from the attachment. 

1. Add a new column to connect two fields.

2. Create a new table.

3. Create a new measure as a Flag.

Flag =
IF (
    ISFILTERED ( FruitStatus[Column] )
        && CALCULATE ( COUNT ( Table1[Column] ), ALL ( Table1[Fruit], Table1[Value] ) )
            = CALCULATE ( COUNT ( FruitStatus[Column] ), ALLSELECTED ( FruitStatus[Column] ) ),
    1,
    BLANK ()
)

MULTIPLE-FILTERS-WITH-OR-CONDITION

 

 

Best Regards,

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

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.