We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

changing Rows to columns

Sshasnk
8 - Asteroid

I have a dataset which is in row but I have to change that into columns 

Input: 

NameValue
avg_height

1.93

avg_width2.36
avg_length

2.23

avg_distance1.23

 

Output:

avg_heightavg_widthavg_lengthavg_distance
1.932.362.231.23
2 REPLIES 2
AngelosPachis
16 - Nebula

Hi @Sshasnk ,

 

A cross-tab tool should do that. Your column headers are in the [Name] field and your values in the [Value] field. You will have to then select a way to aggregate the data, but in this case it doesn't matter as you have unique entries for each new column. So selecting Sum or Avg shouldn't make any difference.

 

If you have multiple records you will need a way to differentiate between them so a column that will act as a unique identifier for each group of records, like shown below

 

NameValueID
avg_height

1.93

1

avg_width2.361
avg_length

2.23

1

avg_distance1.231
avg_height

1.83

2

avg_width2.262
avg_length

2.15

2

avg_distance1.332

 

and you can use that ID field to group by in the cross-tab tool.

 

Cheers,

Angelos

binuacs
21 - Polaris

@Sshasnk as @AngelosPachis mentioned you can use the cross tab tool achieve the result

binuacs_0-1656281783616.png

 

Labels
Top Solution Authors