community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

How to convert a set of columns into rows

I have a dataset that has information in columns and I want to convert these into rows. So essentially I want to go from:

 

monthdatedurationmonthdatedurationmonthdate duration
april2045may1530june1425

 

to: 

 

monthdate

duration

april2045
may1530
june1425

 

any help would be much appreciated!

Alteryx Certified Partner
Alteryx Certified Partner

Hi @sirprince I mocked up a workflow that produces the output you describe let me know what you think?

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @sirprince 

 

Since Alteryx doesn't accept repeated Field Names, you might need to play a little with your data to get your final Ouput.


Here's a possible solution:

 

Transpose1.PNG

 

Alteryx will add a number (+1) for each repeated field name.

 

So you basically need to transpose everything, separate this number (which will be your identifier for each record) using Regex, and use Cross-Tab to get back to your desired format.

 

Workflow attached.

 

Cheers,

Alteryx
Alteryx

Hi @sirprince, i have attached a workflow to help you with this problem. Please take a look and see if it solves your problem. Thanks!

Labels