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'
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 😊