Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Transform row oriented data

rravir
5 - Atom

Hello! I am working with a dataset that has data in row format. 

 

  Q1 2010Q2 2010Q3 2010Q4 2010Q1 2011Q2 2011Q3 2011Q4 2011
Total valueCenter 12003001502001106080100
Total valueCenter 212014013092879590140
SalesCenter 100000000
IncomeCenter 1100012290300
RentCenter 1013141800023
SalesCenter 2000000120
IncomeCenter 2000040000
RentCenter 200000000

 

I want to transform this into a column oriented format like below. 

 

F2NameTotal ValueSalesIncomeRent
Center 1Q1 20102000100
Center 1Q2 20103000013
Center 1Q3 20101500014
Center 1Q4 201020001218
Center 1Q1 20111100290
Center 1Q2 201160000
Center 1Q3 2011800300
Center 1Q4 20111000023
Center 2Q1 2010120000
Center 2Q2 2010140000
Center 2Q3 2010130000
Center 2Q4 201092000
Center 2Q1 2011870400
Center 2Q2 201195000
Center 2Q3 2011901200
Center 2Q4 2011140000

 

I am almost able to achieve this using transpose and cross tab but I am unable to get the quarters in the same sequence. This is what I get as  my output. 

 

F2NameIncomeRentSalesTotal_value
Center 1Q1 20101000200
Center 1Q1 20112900110
Center 1Q2 20100130300
Center 1Q2 201100060
Center 1Q3 20100140150
Center 1Q3 2011300080
Center 1Q4 201012180200
Center 1Q4 20110230100
Center 2Q1 2010000120
Center 2Q1 2011400087
Center 2Q2 2010000140
Center 2Q2 201100095
Center 2Q3 2010000130
Center 2Q3 2011001290
Center 2Q4 201000092
Center 2Q4 2011000140

 

I want to have the quarters in sequence because I want to forecast some columns. Any help is appreciated. 

2 REPLIES 2
binuacs
21 - Polaris

@rravir Split the Name field and apply sort

binuacs_0-1649860066221.png

 

SPetrie
13 - Pulsar

I think you are mostly there, you just need to sort the data. Since there wasnt a great option to sort the Name coulmn how you wanted it, I made one using the year in each on and added that new column to my sort. A select will easily remove the extra helper column.

SPetrie_0-1649860119487.png

 

Labels
Top Solution Authors