Forum Discussion
IF statement for 3 criteria
- 5 years ago
Hey JoanCampbell ,
if you are using the DAX and want to use AND then you have to write your DAX like so:
... IF( AND( AND( condition1 , condition2 ) , condition3 ) , TRUE branch , FALSE branch ) ...using DAX this will work as well, keep in mind that || means OR and && means AND
... IF( ( condition1 && condition2 && condition3 ) , TRUE branch , FALSE branch ) ...Hopefully, this provides the missing link, and helps to tackle your challenge.
Regards,
Tom
Hey JoanCampbell ,
if you are using the DAX and want to use AND then you have to write your DAX like so:
...
IF(
AND( AND( condition1 , condition2 ) , condition3 )
, TRUE branch
, FALSE branch
)
...
using DAX this will work as well, keep in mind that || means OR and && means AND
...
IF(
( condition1 && condition2 && condition3 )
, TRUE branch
, FALSE branch
)
...
Hopefully, this provides the missing link, and helps to tackle your challenge.
Regards,
Tom
- TomMartens5 years agoSuper User
Hey JoanCampbell ,
you have to use || instead of &&. Using && means AND, the condition asks for a row where the same column has to have 3 different values at the same time.
Please excuse, in my 1st reply to your question I replaced the || by && as I was concentrating more on the combination of three conditions as of the content.
Regards,
Tom