Alteryx Designer Desktop Discussions

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

Transpose a Line with date

Hakimipous
10 - Fireball

Hello!

 

I'd like to ask the community about a case where a Line should become a column in the following way

 

Input :

 

F1F2F3F4F5F6
DescriptionsOct 2018Oct 2018Dec 2018Dec 2018Dec 2018
Section 125Brussels100150Leuven
1_BN/ANone50A200
2_BNone    
Section 250AnversBCD

 

Desired Output

 

F1 (Period)F2 DesctiptionValue
Oct 2018Section 125
Oct 2018 Section 1Brussels
Oct 2018 1_BN/A
Oct 20181_BNone
Oct 2018 2_BNone
Oct 2018 2_B 
Oct 2018Section 250
Oct 2018Section 2Anvers
Dec 2018 Section 1100
Dec 2018Section 1150
Dec 2018Section 1Leuven
Dec 20181_B50
Dec 20181_BA
Dec 20181_B200
Dec 20182_B 
Dec 20182_B 
Dec 20182_B 
Dec 2018Section 2B
Dec 2018Section 2C
Dec 2018Section 2D

 

 

I need to transpose my first column and create a "period dimension" for each description

 

Any help would be appreciated

 

Thanks !

4 REPLIES 4
BrandonB
Alteryx
Alteryx

Solution attached

BrandonB
Alteryx
Alteryx

First you need to use a dynamic rename to take the time period names as column headers. As you may notice, due to duplicate time periods, it will rename these headers to have 2, 3, etc afterwards. This isn't an issue as I resolve it further down the line. After that step I used a transpose with the Descriptions column as the key field. This transposes the rest of your data into the proper format. I then used a select tool to reorganize and rename the column headers. Finally, I used a formula tool to trim off the end of the renamed time period fields so that they wouldn't have the _2 or _3 at the end. 

 

Should be all set after that!

Hakimipous
10 - Fireball

That was shorter than I thought :o

 

Thanks again @BrandonB  !

BrandonB
Alteryx
Alteryx

Happy to help! 

Labels