Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

2 dimensional table or not first row as column header

mat_ste_cb
8 - Asteroid

Hi everyone,

I have 2 dimensional table and I want to convert column to row, however I don't know how to keep desired row names.

 

This is my starting table with data. As highlited, column header as well as row names are necessary in further transformation.

image.png

 

 

This is what I want to output. First row and first column have changed their places. image.png

 

I've converted columns to rows, but row with desired column header is not first, so I don't know how to use not first row as column header.

 image.png

 

I attach Alteryx file with data, source data and the final table.

 

 

It would be very great If you find any ideas how to achive it.

 

 

 

Thanks a lot in advance!

4 REPLIES 4
robdelisle
7 - Meteor

Hi @mat_ste_cb,

 

For this you will need to transform your data using the transpose and crosstab tools in the Transform toolkit. The transform tool allows you to get the individual values for each possible combination of the Company and Office Market. Then you can use the crosstab tool to group that data by the Office Market and use the Company as the Column Headers. 

 transpose_commmunity.png
Crosstab_community.png

 

-Robert

ponraj
13 - Pulsar

Here is the sample workflow for your case. Hope this is helpful. 

 

WorkflowWorkflowResultsResults

mat_ste_cb
8 - Asteroid

Thanks a lot, I'm impressed. There is last think I want to do, but I haven't found any solution: how to set custom order of rows (not alphabetically nor numerically)?

 

 

BenMoss
ACE Emeritus
ACE Emeritus

To create a manual sort you can do the following...

 

Bring a text input tool, and create a field called say Name. Then add every value in that list in the order, then use a recordID tool.

 

You can then join this manual list against your main dataset before using a sort on the recordID field.

 

Example attached.

 

Ben

Labels