Forum Discussion

A_Barny's avatar
A_Barny
Frequent Visitor
8 years ago
Solved

Wrong syntax for IF

Hi everyone,   I am beginner on Power BI and I try to do a new colonne on my dataset. I don't understand why my DAX syntaxe is not correct .   I try to use 2 differents fields on same table for ...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Hi A_Barny,

     

    OR function is used to check multiple logical expressions and return true if one of these expressions can be achieved, I'd like to suggest you use 'in' keywords to instead.

    Territory =
    IF ( [Market] = "Sport" && [Region DO] IN { "CA"; "WA" }; "NorthWest"; 0 )
    

    Regards,

    Xiaoxin Sheng