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

Alteryx Designer Desktop Discussions

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

How to combine multiple rows in unknown number of columns

BZeitner
5 - Atom

Given the following input file where you don't know what years are in it:
id, year, status
1,1999,1
2,1999,1
1,2000,1
2,2000,2
1,2001,1
2,2001,2
1,2004,1

 

 

Desired output format:
id, status 1999, status 2000, status 2001, status 2004
1,1,1,1,1
2,1,2,2,null

2 REPLIES 2
Yoshiro_Fujimori
15 - Aurora

Here is one potential solution.

Cross Tab tool does most of the work.

If you stick to the column name, you may want to add Dynamic Rename tool.

 

Workflow

Yoshiro_Fujimori_0-1683239067899.png

Output

Yoshiro_Fujimori_1-1683239125138.png

 

I hope this answers to your question.

ahsanaali
11 - Bolide

One possible solution...

ahsanaali_0-1683259728522.png

 

Labels
Top Solution Authors