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

Alteryx Designer Desktop Discussions

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

How to transpose table?

mestevez1
8 - Asteroid

Hi,

 

I've been trying to transpose a table that would be very simple to do in Excel, but I can't seem to find how to translate to Alteryx.

 

My original table looks like this:

 

DateLicense Type 1License Type 2Total Licenses
12/31/201830134096033397373
1/31/201931576291827407589

 

I want to get to the following:

 

Date12/31/20181/31/2019
License Type 1301340315762
License Type 29603391827
Total Licenses397373407589

 

I eventually want to calculate the delta between each date to check if license use has grow or shrink:

 

Date12/31/20181/31/2019New Licenses
License Type 130134031576214422
License Type 29603391827-4206
Total Licenses39737340758910216

 

The yxmd file is attached for reference.

 

Thanks for the help,

 

Mauricio

3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

Hi @mestevez1 

 

You'll probably need a transpose tool and then a Cross-Tab to get this done.

1.PNG2.PNG3.PNG

 

Notice that the Dates are not ordered and also slashes were replaced by underscores.

This happens when you use the Cross-Tab tool. It replaces any non-alphanumeric character to a underscore.

Also, it orders the columns alphabetically. If you want to keep them in the exact order, you need a workaround.

 

Cheers,

mestevez1
8 - Asteroid

Hi @Thableaus ,

 

Thanks for the lightning fast solution! This solution is perfect.

 

Cheers,

 

Mauricio

owenkosnen
8 - Asteroid

And do you mind elaborating more on the workaround? I am not able to reorder the row with Select tool after the crosstab.

Labels