Alteryx Designer Desktop Discussions

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

How to convert data from vertical to horizontal

amitshaw11237
5 - Atom

I want to convert data from vertical to horizontal, but I want more than first and the last value, as crosstab can return only either first or last record. But suppose I have 3 or more than how to return all the values. For example:

 

Input:

 

IDColumn_HeaderName
ABC123Col1Request 1
ABC123Col2Request 21
ABC123Col2Request 22
ABC123Col3Request 3
ABC123Col4Request 41
ABC123Col4Request 42
ABC123Col4Request 43
ABC123Col5Request 51
ABC123Col5Request 52
ABC123Col6Request 61
ABC123Col6Request 62
ABC123Col6Request 63

 

Output:

IDCol1Col2Col3Col4Col5Col6
ABC123Request 1Request 21Request 3Request 41Request 51Request 61
ABC123 Request 22 Request 42Request 52Request 62
ABC123   Request 43 Request 63
4 REPLIES 4
PhilipMannering
16 - Nebula
16 - Nebula

You need a grouped record ID which you can do with a Multi-Row Tool or Tile Tool,

 
JosephSerpis
17 - Castor
17 - Castor

Hi @amitshaw11237 you can use a Multi-Row tool before you use a crosstab to create a rank field to use in the crosstab tool to ensure all records are spread across different lines. I have mocked up a workflow which showcases one way to approach this.

 

Crosstab_06112023.JPG

Qiu
20 - Arcturus
20 - Arcturus

@amitshaw11237 
I will go with my favorite Tile tool.

1106-amitshaw11237.png

amitshaw11237
5 - Atom

Thank you for the solution, it worked like a charm!

Labels