Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!
SOLVED

Unpivot? & rename columns

Highlighted
5 - Atom

Hi, I've been unsuccessful at un-pivoting a table.  I've searched for some solutions already, and have downloaded some examples, but I'm no closer to a solution.

 

I think this is a combination of transpose, crosstab and dynamic rename but...I need some help!

 

My data looks like this:

 

id | year | population

a | 2020 | 10000

a | 2019 | 9999

b | 2020 | 20000

b | 2019 | 19999

 

Ideal output

 

id | population_2019 | population_2020

a | 9999 | 10000

b | 19999 | 20000

 

Best Regards,

 

Allan

 

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @allan ,

 

Attached is an example showing how to do it.

fmvizcaino_0-1581985637109.png

 

 

Take a look and let me know if this works for you.

Best,

Fernando Vizcaino

Highlighted
5 - Atom

Thank you for the quick response, can you screenshot the settings for the cross tab?

Highlighted
12 - Quasar
12 - Quasar

Here is a dynamic solution that ensures when you add more years you will be all set to go. It cleans up the data and headers from the original format to the final format.

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Sorry @allan ,

 

I've forgotten to share the workflow.

 

BEst,

Fernando Vizcaino

Highlighted
5 - Atom

Thank you both for your quick responses and both solutions work well. I accepted @fmvizcaino 's solution

Labels