Hi All,
Thanks for helping me out on all queries. I'm new to Alteryx and coding so curious and learning new everyday. Pardon me for lame questions.
I've a data of 3000 rows which include tons of books to name it simply let's say A,B,C,D....,X,Y,Z. I want to design a code wherein only for book let's say X and Y i want the Pod to be changed to TRS from existing name mentioned on it. But i don't want Pod to be changed for any other book. It should remain as it is.
Now, based on the guidance from one of fellow community member we designed the code.
IF [Book] = "X" OR [Book] = "Y" THEN "TRS" ELSE Null() ENDIF
Now, with this code its impacting all other books i've in my data and overwriting POD to Null which i don't want. I want other books POD to remain as it is.
Can someone please enlighten me, how can we make it on sample of data from exhaustive data?
Thanks a lot !
Solved! Go to Solution.
Hey Vikas,
maybe this will help:
IF [Book] = "X" OR [Book] = "Y" THEN "TRS" ELSE [ColumnPOD] ENDIF
So basically you chose as ELSE action the column itself, so if the Book is X or Y it's changed to "TRS", else it remains the value from the column
BR
BR - ColumnPOD is not recognized. It came as Unknown variable.
Hey Vikas,
I don't know what your columns are called, so for example:
Take this structure and you want to rebuild your formula, then if in Column A there is an X or Y you want Column B to change to "TRS" instead of "POD",
then your formula would look like this:
IF [Column A] = "X" OR [Column A] = "Y" THEN "TRS" ELSE [Column B] ENDIF
Result is a column which should look like this:
Best regards
@Vikas27 try with brackets like below
IF ([Book] = "X" OR [Book] = "Y") THEN "TRS" ELSE Null() ENDIF
@MTecovis Thanks a lot ! It really worked i've to tweak as per my condition and need to make small change as while doing Column [Pod] i was getting Unbracket error.
So final condition is
IF [Book] = "X" OR [Book] = "Y" THEN "TRS" ELSE [Pod] ENDIF