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

Alteryx designer Discussions

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

Transpose some columns as rows

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?

Alteryx Certified Partner
Alteryx Certified Partner

Hi @felipe_caru 

 

Did you select "Name" as a key field?

 

groupby.PNG

 

Cheers,

Alteryx Certified Partner
Alteryx Certified Partner

@felipe_caru 


Sorting by date you get your final result:

 

sorting.PNG

 

Cheers,

Asteroid

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

 

 

@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.

Alteryx Certified Partner
Alteryx Certified Partner

@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, 

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