Forum Discussion
JoanCampbell
5 years agoFrequent Visitor
IF statement for 3 criteria
Value = IF(AND((Merchandising[Merchandizing Type]="Pack out to shelf" || Merchandising[Merchandizing Type]="Pack out to Exsisting Display"||Merchandising[Merchandizing Type]="Pack out to new display"...
- 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
TomMartens
Super User
5 years agoHey 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