Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

How to extract column headers from a matrix

lerben
6 - Meteoroid

HI all, 

 

I have following problem: I have a matrix that contains 0 and values, for each row I would like to order the column headers in order of these values e.g. 

 

Input     

 ABCD
X0530
Y0002

 

Output

 Category 1Category 2Frequency 1 Frequency 2
XBC53
YD 2 

 

How can I achieve this in Alteryx?

 

Thanks for your help,

-L

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @lerben 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1606817771803.png

Workflow:

atcodedog05_1-1606817786513.png

 

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

atcodedog05
22 - Nova
22 - Nova

Hi @lerben 

 

Here is a dynamic solution provided you have more categories.

Here is a workflow for the task.

Output:

atcodedog05_0-1606818070747.png

Workflow:

atcodedog05_1-1606818086387.png

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

lerben
6 - Meteoroid

Thanks for the quick help, I have two problems. Somehow my strings are cut short. Second I obtain empty columns.... Thanks

atcodedog05
22 - Nova
22 - Nova

Hi @lerben 

 

In the attached workflow i am able to get expected output

atcodedog05_0-1606823968491.png

Can you show me the error you facing?

lerben
6 - Meteoroid

Ok all good now 😉 just had to make the string longer and the columns actually were not empty 

atcodedog05
22 - Nova
22 - Nova

That happens 😅 

 

Happy to help 🙂 @lerben 

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

Labels