We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Populating fields based on column and row headers

Stla
5 - Atom

Hi! I am trying to populate fields based on the column and row header.

 

For example, the input would be: 

#AABBCCDD
e Y  
fY  Y
g  Y 
h Y  
i Y  
j   Y

 

All the blank fields are null. I would like to rename all fields marked with Y with its column and row header, so the ideal output would be: 

 

No.AABBCCDD
e BB-e  
fAA-f  DD-f
g  CC-g 
h BB-h  
i BB-i  
j   DD-j

 

I could only think of using the formula tool and then use IF not null THEN "-[No].", however, my data has 10+ columns so I'm hoping to find a smarter way than doing it one by one. I tried the multi-field formula but couldn't really get it to work. Would really appreciate if anyone can help. Thanks a lot! 

2 REPLIES 2
grossal
15 - Aurora
15 - Aurora

Hi @Stla,

 

here is a way to do it:

 

grossal_0-1587073622640.png

 

Output:

 

grossal_1-1587073654110.png

 

What happens:

1) Shifting columns to rows

2) Changing Data type to allow strings to be longer

3) Combining the Names if cell contains 'Y'

4) Shifting everything back

 

 

Workflow attached. Let me know what you think.

 

Best

Alex

Stla
5 - Atom

Thank you very much! That was very helpful. 

Labels
Top Solution Authors