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
Solved! Go to Solution.
Hi,
I’m not 100% sure what you’re trying to achieve here, but what about something like
If !(isnull([Rating1])) then [Rating1] elseif !(isnull([Rating2])) then [Rating2] else [Rating3] endif
I’m not at my computer right now but that’s the sort of approach I was thinking of unless the various rating fields have different weights.
Cheers,
Iain
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |