Hi everyone,
I have a dataset that is dynamic, and what I'm trying to accomplish is to create a new column based on these dynamic inputs.
| Name | | Rating1 | | | Rating2 | | | Rating3 |
| a | | A | | | | | | A |
| b | | | | | A | | | |
| c | | B | | | B | | | |
| d | | A | | | A | | | |
| e | | | | | A | | | A |
I'd like to create a new column based on the columns Rating1, Rating2, and Rating3 to reflect the correct rating in the new column.
Final output:
| Name | | Rating1 | | | Rating2 | | | Rating3 | Rating-new |
| a | | A | | | | | | A | A |
| b | | | | | A | | | | A |
| c | | B | | | B | | | | B |
| d | | A | | | A | | | | A |
| e | | | | | A | | | A | A |
What I would have done in excel is to use the formula =if(isblank(c2), if(isblank(f2),(i2),(f2),(c2)) in column H and then copy down the values until the last row.
I've tried a variant of the formula in Alteryx:
If(isnull(rating1) or isnull(rating2)) then rating3
elseif
(isnull(rating2) or isnull(rating3)) then rating1
elseif
(isnull(rating1) or isnull(rating3)) then rating2
else 0
endif