Forum Discussion

JoanCampbell's avatar
JoanCampbell
Frequent Visitor
5 years ago
Solved

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"...
  • TomMartens's avatar
    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