Alteryx Designer Desktop Discussions

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

Multiple rows and columns to single row

kcvictor
7 - Meteor
Hello. I've searched the community site, but have not quite found the answer I'm seeking. I have multiple rows and columns and want to transpose it into one continuous row. Please see attached for details. I want the rows with year 20 and year 30 appended to the first row along with headers incremented by 1. The number of rows could vary. I appreciate your help and thanks in advance. Victor
5 REPLIES 5
Kohlmeyl
5 - Atom

Hello,

 

You can use a combination of the transpose and crosstab functions to accomplish this goal. Please see the attached workflow as an example. 

 

I hope this helps!

kcvictor
7 - Meteor
Thank you Kohlmeyl for your quick response and solution.
GiuseppeC
Alteryx
Alteryx

Hi @kcvictor

 

a similar approach to @Kohlmeyl's (who beat me on time!) that allows you to keep the original column order:

 

clipboard_image_0.png

 

Hope this helps!

Giuseppe

 

ChrisTX
15 - Aurora

Here's one more option to ensure fields remain in the same order:  the CReW macro for Block All Records

 

http://www.chaosreignswithin.com/2019/01/block-all-records.html

 

You have an input dataset and want to make sure that the output of your process (e.g. macro) contains all of the fields in the same order as the original file. You could use the Block All Records macro and stream that into a UNION tool. Then set the UNION to read #1 first. It is then up to you whether you will auto-configure by Name or manually configure the data. The bottom line is that the incoming data fields are in the same order on output.

 

kcvictor
7 - Meteor
Thank you GiuseppeC. I was wondering how to change the order and this helps. Victor
Labels