Start Free Trial

Alteryx Designer Desktop Discussions

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

formula issue

lilyyangadsk
9 - Comet

my workflow somehow got issue with the formula i always put in there.

 

i want to show result:  if total billed more than 60k but SFDC stage not showing 'won' or 'stage 4' or 'stage 5' in sfdc,  result shows null

 

error formula now:  if [TOTAL BILLED (CC)]>=60000 and (!contains([Stage],"won") or !contains([stage],"stage 4") or !contains([stage],"stage 5"))   then ''

 

but if i write formula as below change 'or' to 'and',  it shows correct. but in the past i had similiar kind result i want to output, i use 'or' is correct. 

 

if [TOTAL BILLED (CC)]>=60000 and (!contains([Stage],"won") and  !contains([stage],"stage 4") and  !contains([stage],"stage 5"))   then ''

 

 

7 REPLIES 7
PangHC
13 - Pulsar

if it contains 'won'

 

(!contains([Stage],"won") or !contains([stage],"stage 4") or !contains([stage],"stage 5") ->

(False or True or True) ->

True (which is not what you want)


unless you move the not outside.

not (contains([Stage],"won") or contains([stage],"stage 4") or contains([stage],"stage 5") ->

not (True or False or False) ->

not True ->

False


so if come to not on multiple, suggest test all the condition

lilyyangadsk
9 - Comet

hello, thank you for reply, i did a test using formula by and/or, test 3 is normally i use for ! with or formula and it works fine, and this was last year forum gave me this formula using 'or'.

 

But if i use here is wrong. 

PangHC
13 - Pulsar

actually the last part actually does nothing,

you can see actually won and closed should be False but it still True for all.

Pang_Hee_Choy_0-1678855735044.png

 

lilyyangadsk
9 - Comet

so i should use 'AND' ?

PangHC
13 - Pulsar

or as below. which it easier to understand.

Pang_Hee_Choy_0-1678857015197.png

 

lilyyangadsk
9 - Comet

could you take a look at again if i use another to test or/and, it give me using 'or' is correct answer.

 

 

PangHC
13 - Pulsar

you can check it by compare with manual work.

or split to smaller piece to check piece by piece.

 

I happier to provide guidance instead of provide answer directly.

Labels
Top Solution Authors