Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Help need with below mentioned logic using Alteryx

sanky1990
7 - Meteor

I have added below input data and output structure that i need to create with alteryx

 

Input data: 

Column AFlag1Flag2Flag3Flag4Other columns
AYNNNSome data 1
BYNYNSome data 2
CYYYNSome data 3
DNYNYSome data 4

 

Expected Output:

 

Column ANew ColumnOther columns
Ametric1Some data 1
Bmetric1Some data 2
Bmetric3Some data 2
Cmetric1Some data 3
Cmetric2Some data 3
Cmetric3Some data 3
Dmetric2Some data 2
Dmetric4Some 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'

2 REPLIES 2
alexnajm
18 - Pollux
18 - Pollux

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 😊

dreldrel
8 - Asteroid

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 

Labels
Top Solution Authors