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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors