Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Transposing and adding a column

rkirschner
6 - Meteoroid

Hello. Can someone help me figure out how to accomplish something with transposing? It seems that the transpose tool is getting me partially there but I'm not sure how to do the second part.

 

I have data structured in columns and I want to pivot them to rows. Basically, I have a column for current year metric and another column for last years metric. I want to pivot the data so I have a column called "metric", "current value", "last year value". 

 

But I don't want last years metric names added to the rows. I just want the values added to the last year column next to the corresponding metric name. 

 

Hope this is making some sort of sense. The attached screenshot shows what I have and what I want to get to and might make things clearer. 

 

Thanks in advance for taking the time to think about it. 

6 REPLIES 6

Hello @rkirschner 

 

You can use something like the attached and with a join on both dates and Regions, you can get the second column - related to last year - added to the main dataset.

 

Hope that helps. Cheers!

SPetrie
12 - Quasar

You can use a formula to massage the values into what you need and then cross-tab them back into place

transpose.PNG

rkirschner
6 - Meteoroid

Thanks @christine_assaad! That gives me exactly what I need.

rkirschner
6 - Meteoroid

@christine_assaad actually it looks like the last year sales metrics are being duplicated for profit.

Does this make more sense? I made sure metrics will show same values to use this field as an additional condition to blend the 2 data sets

rkirschner
6 - Meteoroid

That did it! Thanks again. 

Labels