Alteryx Designer Desktop Discussions

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

Manipulating Data by Tranposing from Multiple Sheets of Data

kv-defy
8 - Asteroid

I have some enquiry about an issue to convert the dataset while having to import multiple excel sheets.

 

Currently my dataset is 

 

 20212020Variance... (more columns)Variance %
Revenue     
IT Cost     
... (more rows)     
Other Costs     

 

kvdefy_0-1657093407561.png

 

I have successfully import multiple excel sheets and the result is like this:

 

Initial Outcome:

 

 20212020Variance... (more columns)Variance %Country
Revenue     London
IT Cost     London
... (more rows)     London
Other Costs     London
Revenue     Sydney
IT Cost     Sydney
... (more rows)     Sydney
Other Costs     Sydney
...     (others Countries, Berlin, Shanghai and Jakarta)

 

based on the help from here: 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Import-Multiple-Excel-Sheets... 

 

However, I would like to change the dataset into this format ->

 

Desired outcome:

 

YearRevenueIT Cost... (more rows)Other CostsCountry
2021    London
2020    London
Variance    London
... (more columns)    London
Variance %    London
2021    Sydney
2020    Sydney
Variance    Sydney
... (more columns)    Sydney
Variance %    Sydney
...    (others Countries, Berlin, Shanghai and Jakarta)

 

I understand that the idea of the workflow is to separate the year/cost table and the country, transpose year/cost table and use the Join feature (join to the right) to merge the country. How do I exactly do this because I can't simply join because the number of fields in the country column is different?

 

Thank you so much!

3 REPLIES 3
binuacs
20 - Arcturus

@kv-defy one way of doing this with the transpose tool and cross tab tool. In my input file i used only one country. If the solution is not working for you please provide a sample file 

binuacs_0-1657096248712.png

 

flying008
14 - Magnetar

Hi, @binuacs 

 

You are so good !  👍

 

录制_2022_07_06_17_04_36_178.gif

grazitti_sapna
17 - Castor

Hi @kv-defy, another way of solving this problem.

grazitti_sapna_0-1657098564122.png

 

 

I hope this helps!

 

Thanks!

Sapna Gupta
Labels