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

Pivot - Convert Rows to Columns

DellChristy
6 - Meteoroid

I have a data set that needs to be pivoted to work with it.  Each person has a separate column in the table and all of the data for the person is in the column.  I need to transform the table so that each person is in a row and the data for the person is in multiple columns in a single row.

 

If I were doing this in SQL in a database, I know exactly how I would do it either manually or using a Pivot clause.  But, I can't figure out how to do it in Alteryx.  The Transpose tool is giving me multiple records per person, each with a different piece of data.  I've also tried playing with the Cross Tab and Arrange tools, with no success.  I'm obviously overlooking something.  Does anyone have any thoughts?

4 REPLIES 4
markcurry
12 - Quasar

Hi @DellChristy 

 

I've attached a sample workflow, so hopefully that's along the lines with what you are looking for.  If not, can you post an example of your dataset.   

 

There is also a Totally Transpose macro that might help too.... https://community.alteryx.com/t5/Engine-Works/Totally-Transpose-like-totally/ba-p/30222

 

Mark

pedrodrfaria
13 - Pulsar

Hi @DellChristy 

 

You just need to do a transpose and then a summarize. See attached for a quick example below:

 

Dataset before:

pedrodrfaria_0-1613076022584.png

After:

pedrodrfaria_1-1613076030188.png

pedrodrfaria_2-1613076057636.png

 

Thanks,

 

Pedro.

 

 

DellChristy
6 - Meteoroid

@pedrodrfaria, That would be great if I were trying to summarize the data, but I'm not.  With each row containing a specific piece of data, like name, department, or score, I need to have a table with, for example, name, department, and score columns and a row for each person currently defined by a column.

pedrodrfaria
13 - Pulsar

Hi @DellChristy 

 

Is it this you are looking for?

 

pedrodrfaria_0-1613078905828.png

 

You can do use the output data to output each person to the specific table if you are also trying to output them separately. 

 

pedrodrfaria_0-1613079002578.png

 

 

Pedro.

 

 

Labels