ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

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

How to Turn Rows in One Column Into Field Headers.

TwanD
7 - Meteor

Hi everyone,

 

I'm trying to turn all my rows under F1 column into headers and having a hard time figuring out how to do so.

 

Original Data:

 

F1                             F2             F3               F4

Tax Owner               O1             O1              O2

Tax Code                 001            001             002

Entity Name             A                B                C

 

I want it to look like this:

 

Tax Owner              Tax Code             Entity Name

O1                           001                       A

O1                           001                       B

O2                           002                       C

 

I tried transposing and that doesn't seem to work. Any help would be greatly appreciated, thanks!

Kenda
15 - Aurora
15 - Aurora

Hey @TwanD! The key here is to Transpose your data and then Cross Tab it. With your Transpose, you will want F1 to be your key field and the rest Data Fields. After that, in your Cross Tab tool, Group By the Name field and then set F1 as the new headers and the Value field as the values for new columns. You can then use a Select to rearrange and get rid of the Name field. Hope this helps!

 

transposecrosstab.PNG

TwanD
7 - Meteor

Thank you so much, I had tried to crosstab after transposing as well but what I didn't do was checking the Name to be grouped for Value so then it wasn't crosstab correctly. Thanks again, greatly appreciate your help because it was driving me a bit nuts lol.

Kenda
15 - Aurora
15 - Aurora

@TwanD No problem, glad to help! Things like this just come with experience. I remember the first time someone else showed me this trick to solve a similar problem I was having. 

Daniel_Aguirre
5 - Atom

Thanks @Kenda  

Adhiti
5 - Atom

Thank you so much for this answer ,i was stuck with a similar issue for 2 hours 😞 and your answer helped. But i am still trying to understand the logic for how  cross tab and transpose work.

Kenda
15 - Aurora
15 - Aurora
Labels