We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun 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