Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Excel to Alteryx IF Statement

kvrensanchez
6 - Meteoroid

Hello,

 

I am trying to create a formula that I've already created in excel and transferring it over to Alteryx. Assuming that the cell references in excel are the same name of the fields in Alteryx, how do I edit my formula to work in Alteryx?

 

Thank you,

 

=IF(B12987="",IF(U12987="",IF(D12987="",W12987,IF(D12987="",W12987,D12987)),U12987),B12987)

4 REPLIES 4
jdunkerley79
ACE Emeritus
ACE Emeritus

You can replace IF with IIF (inline IF) and then that expression would be valid without the leading =:

IIF(B12987="",IIF(U12987="",IIF(D12987="",W12987,D12987),U12987),B12987)

 

I simplified it a bit as you had a duplicate condition in it.

kvrensanchez
6 - Meteoroid

Thank you! I updated the formula with the name of the fields, however for some reason I am still only returning the 'B12987' field only. My data has "nulls" instead of blanks, could this be the reason? 

 

 

jdunkerley79
ACE Emeritus
ACE Emeritus

You would need to update the expression to:

IIF(ISNULL(B12987),IIF(ISNULL(U12987),IIF(ISNULL(D12987),W12987,D12987),U12987),B12987)

 

if you have a combination of NULLs and "" then you can use:

OR(ISNULL(B12987),B12987="")

 

Hope it helps

kvrensanchez
6 - Meteoroid

Thank you so much, this worked perfectly! 

Labels