In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

formula AND or OR

lilyyangadsk
9 - Comet

i want to write formula for below !contain with several conditions: either SFDC stage not won or not lost or not closed , should i use 'AND' or "OR" in bracket .

 

OPTION A: IF [UUID Check]="T" AND [Date check]="T" AND [Country check]="T" and [Date Diff]<=90 AND (!contains([Stage],"won") or !contains([stage],"lost") or !contains([stage],"closed") or !contains([stage],"close")) THEN "X"

 

 

 

OPTION B: IF [UUID Check]="T" AND [Date check]="T" AND [Country check]="T" and [Date Diff]<=90 AND (!contains([Stage],"won")  AND ! contains([stage],"lost")  AND  !contains([stage],"closed")   AND  !contains([stage],"close")) THEN "X"

 

 THANK YOU~

2 REPLIES 2
danilang
19 - Altair
19 - Altair

Hi @lilyyangadsk 

You can either use 

 

(!contains([Stage],"won") AND !contains([stage],"lost") AND !contains([stage],"closed") AND !contains([stage],"close"))

 

or 

 

!(contains([Stage],"won") OR contains([stage],"lost") OR contains([stage],"closed") OR contains([stage],"close")) Negation on the outside of the entire clause and removed from the individual sub clauses 

 

The two are equivalent

 

Dan

 

 

lilyyangadsk
9 - Comet

THANK YOU VERY VERY MUCH for quick reply.!

Labels
Top Solution Authors