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

AND vs OR in Advanced Filters

I am using an Advanced Filter on a lookup table with a column called ProductClass. See the screenshot:

analyticsyc_0-1712078061913.png

 

Can anyone explain why when I use 'OR', the underlying data doesn't change. Its as if nothing satisfies the filter argument But when I use 'AND', then the filter is applied properly. I would've expected the opposite. 

This seems counterintuative based on my coding background. OR statements are typically used to evaluate multiple possible conditions, with only 1 condition needing to be satisfied. Meanwhile AND statements are typically used to evaluate multiple possible conditions, with all conditions needing to be satisfied. 

I know for a fact that my underlying data is not satisfying all 4 conditions, since it is a 'does not start with' filter, and a single row value cannot start with 4 different values. 

 

So my questions are:
-am I just misunderstanding 'AND' vs 'OR' filters in PowerBI, or is there something else strange going on?
-Why does the 'AND' filter behave exactly like I would've expected the 'OR' filter to behave based on coding experience, while the 'OR' filter does aboslutely nothing, like I would've expected the 'AND' filter to behave?

1 ACCEPTED SOLUTION

@analyticsyc 


I believe I understand now. You're using "Does not equal to," which negates the condition, indicating that you want to exclude certain values. Therefore, Power BI's interpretation is correct.

In my example, I utilized "Starts with," which aligned with my intended outcome.

Fowmy_0-1712095953947.png

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@analyticsyc 

The way you have understood and explained, yes it is correct. I also tested but it is working correctly. check my screenshot below. Please recheck your result how you got right with AND.

Fowmy_0-1712080005289.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy 

 

Thanks for your response. I agree that your example seems to be working as expected. I've provided additional screenshots showing how it doesn't work for me:

Filter applied with 'OR':

analyticsyc_0-1712085663294.png


Filter applied with 'AND':

analyticsyc_1-1712085700987.png


Would you mind testing something for me? If you do 3+ arguments in the advanced filter (first select 3+ items in basic filter, then switch to advanced and it should give you the option for 3+ advanced filters), does the 'OR' operator still work for your data?

@analyticsyc 


I believe I understand now. You're using "Does not equal to," which negates the condition, indicating that you want to exclude certain values. Therefore, Power BI's interpretation is correct.

In my example, I utilized "Starts with," which aligned with my intended outcome.

Fowmy_0-1712095953947.png

 



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors