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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.