ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Repetition in Columns to Rows

cchueh
7 - Meteor

Hello,

 

I have flight data that are categorized in column B "Routing", I would like to have this information going across horizontally as Flight In , Time, Route then Flight Out, Time, Route, and then Flight In 2, etc.

 

In addition, after the the data have been transposed horizontally, any repetitions of rows after the first row can be deleted. As well as, one person can have up to 15 occurrences of fly in and fly out, so how do I concise it and not have an output that have so many columns? 

 

Input

cchueh_0-1592594657187.png

 

Preferred Output:

 

cchueh_1-1592595004464.png

 

My current workflow, however's it's messy and not as concise as I would like it to be:

 

cchueh_2-1592595199291.png

 

cchueh_3-1592595214839.png

 

3 REPLIES 3
RobertOdera
13 - Pulsar

Hi, @cchueh 

 

Slightly different result presentation (due to limitations seeding field values into field name).

Still, try this.

 

Please mark as a solution if acceptable + like if helpful.

 

str_name_key, Date, Dir (in or out), Time, Route

RobertOdera_0-1592617055043.png

 

The workflow is attached.

Cheers!

 

 

Blake
12 - Quasar

Hi @cchueh - I took a little bit different approach than @RobertOdera but I think it will still work. One of the great things about Alteryx is the ability to solve the same problem in many different ways. 

 

flights.png

 

 

RobertOdera
13 - Pulsar

You're most welcome, @cchueh !

Cheers.

Labels
Top Solution Authors