I have a table with header names
x1 | x2 | A | x4 | x5 | B | C | x8 |
I want to rename A, B and C to Happy, Sad, and Lucky, just as an example. I have tried using formulas with dynamic rename but none of it is recognized/syntax is incorrect:
IF [_CurrentField_]=="A" THEN [_CurrentField_]=="Happy" ELSEIF [_CurrentField_]=="B" THEN [_CurrentField_]=="Sad" ... etc
I tired using a right input data file, but that overwrites the first three column headers only and doesn't let me specify the column names I want it to change.
Solved! Go to Solution.
Hi @shaheer
The correct way to use this formula is like this:
IF [_CurrentField_]=="A" THEN "Happy" ELSEIF [_CurrentField_]=="B" THEN "Sad" ELSE "Other" ENDIF
Here's how I would do it (see spoiler). Also, please note that double equals is the exact same as a single equals in Alteryx.