Hi All,
I need to tell Alteryx, for EMP ID, select name from A and if no name available then from B and then from C.
Some time there will be no EMP ID in A so it should start looking from B.
In excel, we use IF/IF error for this.
I am very new to Alteryx so your help will be appreciated.
Please refer to attachment
Thanks,
Ajith
Solved! Go to Solution.
@ajithey See the attached solution with comments explaining each tool.
In summary, I'd transpose the records and then clean them up with Regex.
Hi @ajithey
The equivalent of the IIF in excel is a formula tool with and IF-ELSE-ENDIF structure
if !isnull([Emp ID- A]) then [Name - A] elseif !isnull([Emp ID- B]) then [Name - B] else [Name - C] endif |
The corresponding work flow looks like this
The Name column at the end picks up the value from Name-, Name-B or Name-C, depending on the corresponding EMP ID-x field
Note that in order to get all the cases in the output, I had to modify your input data and put in 2 null values for Emp ID-A. Otherwise the formula would always have returned Name-A
Dan
Thanks, this helps me