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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
giuliapiazza94
Helper IV
Helper IV

Boolean OR doesn't work

Hi guys,

I've written a dax function with OR but it doesn't work and I don't kwon why

 

giuliapiazza94_0-1649345519350.png

 

If I write them separately, them work

giuliapiazza94_1-1649345639063.png

 

giuliapiazza94_2-1649345661668.png

 

Can you help me please?

Thank you 🙂

 

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Note that A<>B || A<>(B-1) is always true since A cannot be both B and B-1 simultaneously.

 

I think what you might actually be after A is not equal to either, in which case you'd use && instead.

NOT ( A = B || A = B - 1 )

is logically equivalent to

A <> B && A <> B - 1

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

Note that A<>B || A<>(B-1) is always true since A cannot be both B and B-1 simultaneously.

 

I think what you might actually be after A is not equal to either, in which case you'd use && instead.

NOT ( A = B || A = B - 1 )

is logically equivalent to

A <> B && A <> B - 1
HotChilli
Super User
Super User

What result do you want?

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.