Alteryx Designer Desktop Discussions

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

Using Cross Tab to convert columns to rows

robertcox
6 - Meteoroid

I have a dataset where each record has an ID and 4 columns for income.  I am trying to use the Cross Tab tool with a summarize to select the highest value and return the column name for the new value.

 

So, basically, I want to turn this: 

IDHigh_IncomeLow_IncomeMid_High_IncomeMid_Low_Income
51706682183
51706694121415
517429427225
517429551139

 

Into this:

IDValue
5170668Mid_Income
5170669High_Income
5174294Mid_High_Income
5174295Low_Income

 

I have tried to use the cross tab with the ID as the Key and my 4 income columns as Data Columns, then summarized and grouped by ID, then Group By Name, then Max Value, but I am getting 4 records for each ID.

1 REPLY 1
patrick_digan
17 - Castor
17 - Castor

@robertcox I would do it like this (transpose, sort and then sample). 

 

patrick_digan_0-1615496733823.png

 

Labels