Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Transpose some columns as rows

felipe_caru
5 - Atom

Hello all, I'm new at Alteryx and thus, not know much on how to use it.

 

I am trying to transpose some data from columns to row, but what I've found in the description of the tool 'transpose' doesn't seem to work for what I want. Can anybody help me / guide me with this?

 

What I want to do is the following. The data from Table 1/Origin is, as example:

 

NAME01/01/201902/01/2019
A12
B34
C56
D78

 

And I want to end with the data like this:

 

NAMEDATEDATA
A01/01/20191
B01/01/20193
C01/01/20195
D01/01/20197
A02/01/20192
B02/01/20194
C02/01/20196
D02/01/20198

 

How can I do this? Is it possible?

6 REPLIES 6
Thableaus
17 - Castor
17 - Castor

Hi @felipe_caru 

 

Did you select "Name" as a key field?

 

groupby.PNG

 

Cheers,

Thableaus
17 - Castor
17 - Castor

@felipe_caru 


Sorting by date you get your final result:

 

sorting.PNG

 

Cheers,

echuong
8 - Asteroid

See attached for an example workflow. Let me know if that works for you!

 

 

felipe_caru
5 - Atom

@Thableaus

Thank you, did the test with some data and it worked as seen. Question, though:

I am using an Excel sheet as the input data. If I update the Excel sheet with more inforamation, is there any way to refresh the input? Because most likely I'll be chaning the information on it (such as the number of date columns, since some months can have 30, 31 or 28 days for example).

 

I am asking because I tested it by adding more columns, however when running the workflow again it only shows what I had before, in the first Excel file.

Thableaus
17 - Castor
17 - Castor

@felipe_caru 

 

Yes, you need to check the "Dynamic or Unknown Fields" option of the Transpose tool, under the 'Data Fields'.

 

That way in case of new columns come up in your file they will be automatically selected and transposed.

 

Cheers, 

felipe_caru
5 - Atom

Thank you very much!

 

I realized that my data didn't update because I had input as text file, and not a file itself. When I used it as input file (not text), it worked. Thanks again

Labels
Top Solution Authors