Cast your vote for the official 2025 Inspire Pin! Designs were submitted by fellow Community members and reflect the creativity and passion of Alteryx users across the globe. Vote now!

Alteryx Designer Desktop Discussions

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

Transpose / unpivot multiple rows to columns

hiteshg
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 ANTWORTEN 3
ponraj
Pulsar

Sample workflow as below.  Hope this is helpful. 

 

Transpose unpivot multiple rows to columns.PNG

hiteshg
Atom

Thanks @ponraj it worked like a charm.

Ilango
Meteor

Hi Ponraj,

 

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

 

Thanks again, Ilango.

Beschriftungen
Top-Lösungs-Autoren