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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Hubblet
Frequent Visitor

Filters on this visual - Advanced filtering AND/OR logic

Hello,
I am having trouble understanding the Power BI logic in a case where I want to remove BLANK and "UNKNOWN" product names from a matrix visual. This only works if I set the advanced filtering for ProductName to: is not blank AND is not "UNKNOWN", which is completely different from the logic in SQL (ProductName IS NOT NULL OR ProductName != 'UNKNOWN').
I just can't wrap my head around this. Could someone please explain why this works like it does.

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

The OR logic doesn't make sense to me. All values are either not null or not unknown because they can't be both at the same time.

 

By DeMorgan's law,

(P is not NULL or P is not UNKNOWN)

is logically equivalent to

not (P is NULL and P is UNKNOWN)

 This always returns true since P cannot have multiple values simultaneously.

View solution in original post

3 REPLIES 3
AlexisOlson
Super User
Super User

The OR logic doesn't make sense to me. All values are either not null or not unknown because they can't be both at the same time.

 

By DeMorgan's law,

(P is not NULL or P is not UNKNOWN)

is logically equivalent to

not (P is NULL and P is UNKNOWN)

 This always returns true since P cannot have multiple values simultaneously.

Absolutely got the entire thing wrong in my head. Thanks!
The SQL I wrote is wrong, it is supposed to be: ProductName IS NOT NULL AND ProductName != 'UNKNOWN'

rajendraongole1
Super User
Super User

Hi @Hubblet -Power BI's filter pane combines conditions with AND, meaning all specified conditions must be met for data to be included in a visual. This is different from SQL’s "OR" logic, but understanding this distinction allows you to apply the correct filters in Power BI to get the desired results.

Example:

ProductName is not blank
ProductName is not "UNKNOWN"

 

rajendraongole1_1-1722595336185.png

 

Hope it helps

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.