Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Column headers concatenation

monish_chandra
8 - Asteroid

Hi,

 

I'm trying to create a separate column which stores the concatenated string of column headers which has a value. It should not consider in the string if there is a 0 or null value. I've added the 'EXPECTED_RESULT' column to show how it should look like. I tried to use the transpose and cross tab tool. But looks like my data is already in a cross tab format. How can create the last column in the below table?

 

IDDESCRIPTIONCODEHOSP1HOSP2HOSP3HOSP4EXPECTED_RESULT
1ACETOMINOPHINS46570102050HOSP2,HOSP3,HOSP4
2TYLENOLH345623  56HOSP1,HOSP4
3IODEXNOLA46572 10HOSP1,HOSP3
1 REPLY 1
Morgan_Thomas
8 - Asteroid

Hello, 

 

I've attached a solution I think will work. let me know what you think.

 

Thanks!
Morgan

Labels
Top Solution Authors