Alteryx Designer Desktop Discussions

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

More options for IF statements needed

ulrich_schumann
8 - Asteroid

Hi all,

I am working on  a IF Statement where I need to check multiple conditions. I am aware that there are no OR/AND stsatements, but how would I translate the following into proper Alteryx syntax?

 

IF
[Infrastructure Involvement] ='NULL'
OR [Infrastructure Involvement] = 'Migration - to be classified'
OR [Infrastructure Involvement] = '0 Project has no infrastructure part'
AND [Request Status] = 'NULL'
THEN 'PPM entry has no Infrastructure part'

 

ELSEIF
[Infrastructure Involvement] = '1 Project contains infrastructure part'
AND [Request Status] = 'NULL'
THEN 'PPM entry has Infrastructure part but not started'

 

ELSEIF
[Request Status] = 'Request for more information'
OR [Request Status] = 'Under Review'
OR [Request Status] = 'Detailed Estimate'
OR [Request Status] = 'Detailed Estimate Approved'
OR [Request Status] = 'Detailed Estimate Submitted'
OR [Request Status] = 'High Level Estimate Submitted'
THEN 'Proposal Phase'

 

ELSEIF
[Request Status] = 'Implementation'
[Request Status] = 'Implementation approved'
THEN 'Implementation'

 

ELSEIF
[Request Status] = 'Completed'
OR [Request Status] = 'Closed'
THEN 'Completed"

 

ELSE
'Canceled/on hold/other'

 

ENDIF

 

Thanks for your help ...

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

Hi @ulrich_schumann! And/or statements do work in if statements. When I copied your above formula to Alteryx, there were 2 errors: 

1) added Or statement:  [Request Status] = 'Implementation' OR
[Request Status] = 'Implementation approved'

 

2) Switched a double quote to single quote: THEN 'Completed'

 

That then validated. For what it's worth, I think IN is easier than or: [Infrastructure Involvement] IN ('NULL','Migration - to be classified','0 Project has no infrastructure part') would replace several Or statements and be equivalent.

 

Hope that helps!

ulrich_schumann
8 - Asteroid

Thanks for your help Patrick. It's working now.

Labels