hi,
i'm new to Alteryx and trying to solve for an issue where i have 3 columns of names - first, middle and last. The middle name/initial is only populated in a few rows which pushes the last name to the third column in some cases. In most cases, the last name is in Column 2 so Column 3 is [NULL]. I changed [NULL] to 0 and now i want to replace the 0s in Column 3 with the value in Column 2. If there's an actual last name in Column 3 then i would like to keep that value. This would leave me with the few last names that were already populated in Column 3 and then essentially move the last names from Column 2 over to Cso that i'm capturing all last names in one column.
i am trying an IF statement with Replace but it's not working. i think there's a way to also use ISNULL but i couldn't figure that out so i changed NULL to 0. i know this is not right but i'm showing what i was trying just in case it helps.
IF [Receiver Name3]="0" THEN Replace("0", [Receiver Name3], [Receiver Name2]) ELSE "" ENDIF
Can anyone offer any insight?
Thanks!
Solved! Go to Solution.
@dattina2287
I think you are almost there but might be confused with the Replace Function.
Your target here is to check if the Column is equal to zero.
If yes, then use the value from Column 2, if not, then keep as it is.
IF [Receiver Name3]="0" THEN [Receiver Name2] ELSE [Receiver Name3] ENDIF
this worked perfectly! Thank you so much!
@dattina2287
Thank you for the feedback 😁