I have added below input data and output structure that i need to create with alteryx
Input data:
Column A | Flag1 | Flag2 | Flag3 | Flag4 | Other columns |
A | Y | N | N | N | Some data 1 |
B | Y | N | Y | N | Some data 2 |
C | Y | Y | Y | N | Some data 3 |
D | N | Y | N | Y | Some data 4 |
Expected Output:
Column A | New Column | Other columns |
A | metric1 | Some data 1 |
B | metric1 | Some data 2 |
B | metric3 | Some data 2 |
C | metric1 | Some data 3 |
C | metric2 | Some data 3 |
C | metric3 | Some data 3 |
D | metric2 | Some data 2 |
D | metric4 | Some data 4 |
New Column Definition
if flag1=Y then 'metric1'
if flag2 =Y then 'metric2'
if flag3=Y then 'metric3'
if flag4=Y then 'metric4'
Solved! Go to Solution.
Transpose your data (group by Column A and Other columns, data columns should be the 4 flag columns), Filter to where Value = "Y", and Formula to do the conversions you mentioned 😊
Agreed with @alexnajm's idea, one thing you may need to consider is that the conditional logic runs from top to bottom. If it matches the first condition, it won't check the second or third one. It seems like you may have a value "Y" in different Flags at the same time; you may need to slightly update your condition. If this helps, please like the comment
User | Count |
---|---|
107 | |
85 | |
76 | |
54 | |
40 |