Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
admin11
Memorable Member
Memorable Member

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 return only :-
7 Order Won
8 Order Lost
 
I like to modify the expression , So that it will return not :-
7 Order Won
8 Order Lost
 
I have try :-
_WONnLOSTonly_alq = IF ( 'CRM_TS'[Stage]= Blank(), "No Deal",if (CRM_TS[Stage] NOT in {"7 Order Won","8 Order Lost"},"1","0"))
 
Also try :-
_WONnLOSTonly_alq = IF ( 'CRM_TS'[Stage]= Blank(), "No Deal",if NOT (CRM_TS[Stage] in {"7 Order Won","8 Order Lost"},"1","0"))
 
All above both not working 
 
Paul
1 ACCEPTED SOLUTION
KayceVC
Helper II
Helper II

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. 

 

View solution in original post

2 REPLIES 2
KayceVC
Helper II
Helper II

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. 

 

@KayceVC 

Thank you very much , it work.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors