Alteryx Designer Desktop Discussions

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

How to transpose a table????

tseo
7 - Meteor

Hello, I have a problem with transposing a table....

 

my data is like ;

 

IDContract nameCompany2017 sales2017 profit2018 sales2018 profit2019 sales2019 profit
1aaaaaNew York123312123413432114
2bbbbbPeking422132543223542254
3cccccLA9888767779945634576432234
4dddddSydney1356322342478852343457421234

 

and I want this to be like;

 

IDContract nameCompanyYearDataValue
1aaaaaNew York2017Sales1233
1aaaaaNew York2017Profit12
1aaaaaNew York2018Sales1234
1aaaaaNew York2018Profit13
..................

 

and so on

 

any tips or ideas???

 

Thanks.

 

1 REPLY 1
CharlieS
17 - Castor
17 - Castor

Hi @tseo 

 

The Transpose is the first step, but there's a couple more to get the desired output. After the Transpose, use a Text to Columns tool to split the "2017 profit" titles into separate year and name fields. Once that is done, a Select tool can rename and rearrange the fields to your desired output.

 

20200522-SalesTranspose.PNG

 

Check out the attached workflow for an example.

Labels