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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
MattKarriker2
Helper II
Helper II

Multiple Filters with OR Condition

Good afternoon Forum

I am working on an inventory model and my users are looking for a way to supply multiple filters to visuals with an OR condition.  Example: apply a filter where [On Hand Qty] > 500 or [Stock Room Qty] < 100.  I need the solution to be dynamic in that I do not know all the combinations of attributes or measures a user may want to apply.  Any thoughts on how to apply this to a visual?

 

4 REPLIES 4
Anonymous
Not applicable

Hi @MattKarriker2 ,

 

Here's my sample data.

12.png

 

1.Create a separate table which will be used in the slicer. It is created by entering data.

Screenshot 2021-01-28 145413.png

 

2.Create the measure.

Measure = 
IF (
    ISFILTERED ( 'Table (2)'[Slicer] ),
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( 'Table (2)'[Slicer] ) = "[On Hand Qty] > 500"
            && CALCULATE (
                SUM ( 'Table'[On Hand Qty] ),
                FILTER ( 'Table', [On Hand Qty] > 500 )
            )
                = MAX ( 'Table'[On Hand Qty] ), 1,
        SELECTEDVALUE ( 'Table (2)'[Slicer] ) = "[Stock Room Qty] < 100"
            && CALCULATE (
                SUM ( 'Table'[Stock Room Qty] ),
                FILTER ( 'Table', [Stock Room Qty] < 100 )
            )
                = MAX ( 'Table'[Stock Room Qty] ), 1
    ),
    1
)

 

3.Put the measure into Filters, then set Show items when the value is 1.

Screenshot 2021-01-28 145615.png

 

The result is as follows.

Screenshot 2021-01-28 145717.pngScreenshot 2021-01-28 145710.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

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

 

@Anonymous I am looking for a more dynamic way of accomplishing this.  We are trying to create an Ad-Hoc reporting site using Power BI and I do not know the values or metrics the user will apply to the report.  Any thoughts on this?  

@MattKarriker2 

If you don't know what is going to be filtered, perhaps the best option is to show them (video, tutorial, whatever)  how to use the filter pane where they can filter by fields (columns) or measures etc...





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






PaulDBrown
Community Champion
Community Champion

@MattKarriker2 

it is possible but you will need to define the criteria (combinations) using either measures (so pre-calculated), or  predefined tables of values (which can be based either a fixed set of values or on values within the model: for example creating a table with increments of "100" between a minimum and maximum value in the model).

Would either of these work for you?

Do you have a dummy dataset to play around with? (to share, upload to a cloud service such as Onedrive, Google Drive, Dropbox etc and share from there)

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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