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

Generate Columns from Rows

dan_b
7 - Meteor

What is the most efficient way to generate columns based on the values listed on another column? (see below)

 

 

2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @dan_b 

 

Use the Cross-Tab tool.

 

Cheers,

Kenda
16 - Nebula
16 - Nebula

Hi @dan_b 

 

I would recommend using the Cross Tab tool. You will want to first create a group field, though, so that all of your values don't get concatenated into each new field. 

 

Use a Multi-Row Formula tool to create a new numeric field with this expression:

iif([Name]="id",[Row-1:Group]+1,[Row-1:Group])

 

Then simply add a Cross Tab tool. Group by your newly created field. Choose Name for the column headers and Value for the Values for new columns. Then select whichever method for aggregating values you'd like.

 

Capture.PNG

 

Hope this helps!

Labels