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

Alteryx Designer Desktop Discussions

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

Transpose / unpivot multiple rows to columns

hiteshg
5 - Atom

Hi,

 

I want to transpose / unpivot my data based on multiple rows. FOr example my data looks like:

 

  Gross RevenuesSituationLTM     
 NetherlandNetherlandNetherlandUKUKUKGermanyGermanyGermany
 EuropeEuropeEuropeEuropeEuropeEuropeEuropeEuropeEurope
 202020212022202020212022202020212022
Flyer1352501895611362429904561371
Flyer245918642862181731412191936
Flyer358870160335667443883955122

 

I need to delete the first and third row and then unpivot data based on Country and Year. So that my output contains only four columns Flyer#/ Country/ Year/ Value.

My desired output should look like:

 

FlyerCountryYearValue
Flyer1Netherland2020 
Flyer2Netherland2020 
Flyer3Netherland2020 
Flyer1UK2020 
Flyer2UK2020 

 

Any suggestion on how to proceed with the task?

 

Thanks in advance :)

3 REPLIES 3
ponraj
13 - Pulsar

Sample workflow as below.  Hope this is helpful. 

 

Transpose unpivot multiple rows to columns.PNG

hiteshg
5 - Atom

Thanks @ponraj it worked like a charm.

Ilango
7 - Meteor

Hi Ponraj,

 

I had same requirements. When I searched in google, I found this. Thanks much - you made my day 🙂

 

Thanks again, Ilango.

Labels