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

Nested IF

MikeFrancis1959
8 - Asteroid

 

I am having an issue with my IF statement ( see below). The part giving me an issue is if the columns 2nd GI and 3/31 Plan column does not have a date I want to use the PO Due Date but my formula below does not do anything, do I have it setup incorrectly?

 

IF IsNull([2nd GI])
THEN [3/31 Plan]
ELSEIF IsNull([3/31 Plan])
THEN [PO DUE DATE]
ELSEIF Contains([2nd GI], 'ETA')
THEN Right(Replace([2nd GI], "ETA ", ""),5)
ELSE [2nd GI]
ENDIF

Thanks,

Mike

 

 

PN PO Due Date 1st GI 2nd GI Commit Day 3/31 Plan Note
A1 1/2/2023 1/17/2023 1/18/2023 1/18/2023
A1 1/2/2023 1/17/2023 ETA 01/17/23 1/17/2023
A1 1/2/2023 4/14/2023 4/14/2023
A1 1/2/2023 If there is no date in "3/31 Plan" and " or "2nd GI" then use PO DUE DATE

Mike

 



4 REPLIES 4
SPetrie
13 - Pulsar

Youre first statement will break your logic here.

IF IsNull([2nd GI])
THEN [3/31 Plan]

Its not checking if 3/31 is null or not, its just setting the value, so even if its null, null is what you will get.

You need to be more specific with your check to say isnull 2nd Gi and not is null 3/31

IF IsNull([2nd GI]) and !isNull([3/31 Plan])
THEN [3/31 Plan]

 

binuacs
21 - Polaris

@MikeFrancis1959 would you be able to provide your input data in proper format with the expected output? That would be easy to understand your usecase

MikeFrancis1959
8 - Asteroid

Here is the data

Mike

binuacs
21 - Polaris

@MikeFrancis1959 updated workflow attached

 

binuacs_0-1680882149975.png

 

Labels
Top Solution Authors