Alteryx Designer Desktop Discussions

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

Multiple Statements in a formula

bman213
7 - Meteor

Hi all,

 

I am hoping someone can help. I ma trying to create a formula that selects multiple arguments for one output, but I ma struggling some.

 

IF [STATUS_1] = "C" AND([OPERATED] = "YES" AND !isnull([DATEOPERATED]) AND [TURN_COUNT] > 0 THEN "C"
ELSE "" ENDIF

 

So if the (status1, Operated, Dateoperated and Turn Count > 0) THEN "C"

 

Thanks in advance!

3 REPLIES 3
Luke_C
17 - Castor

Hi @bman213 

 

I think you either need to close the parenthesis you opened after 'And([Operated]...' or remove it. 

 

IF [STATUS_1] = "C" AND([OPERATED] = "YES" AND !isnull([DATEOPERATED]) AND [TURN_COUNT] > 0) THEN "C"
ELSE "" ENDIF

Hollingsworth
12 - Quasar
12 - Quasar

I agree with @Luke about the parenthesis match

 

you can also try the iif syntax which I like for conciseness:

- with parenthesis
iif( [STATUS_1] = "C" && ([OPERATED] = "YES" && !isnull([DATEOPERATED])) && [TURN_COUNT] > 0,"C","")
- OR without parenthesis
iif( [STATUS_1] = "C" && [OPERATED] = "YES" && !isnull([DATEOPERATED]) && [TURN_COUNT] > 0,"C","")

John Hollingsworth
Clear Channel Outdoor
bman213
7 - Meteor

Thanks to both of you guys, it is this community that really makes Alteryx so beneficial. Appreciate the help!

Labels