Forum Discussion

admin11's avatar
admin11
Icon for Memorable Member rankMemorable Member
5 years ago
Solved

How to add NOT in my expression ?

Hi All Below expression working fine :-   _WONnLOSTonly_alq = IF ( 'CRM_TS'[Stage]= Blank(), "No Deal",if (CRM_TS[Stage] in {"7 Order Won","8 Order Lost"},"1","0"))   Above expression will retu...
  • KayceVC's avatar
    5 years ago

    It sounds like you want your formula to calculate when CRM_TS[Stage] is blank or when it is not 7 or 8. For that, all you should need is:

     

    IF ( 'CRM_TS'[Stage]= Blank(), "No Deal",
    IF('CRM_TS'[Stage] <> "7 Order Won"  && 'CRM_TS'[Stage] <> "8 Order Lost","1","0"))

     

    This is basically telling the 2nd IF that if 'CRM_TS'[Stage] is not equal to 7 AND 'CRM_TS'[Stage] not equal to 8, then 1 else 0.