Alteryx Designer Desktop Discussions

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

Complex Transpose - Grouping & Renaming Columns

drewh
7 - Meteor

Hello experts - 

 

I have a data set that looks like the below:

 

DateRegionGroup 1Group 2Group 3TotalGroup 1 %Group 2 %Group 3 %Total %
1-SepXX9476665726%22%10%2%
2-SepYY687177632%41%8%36%
3-SepZZ659759961%35%49%35%
4-SepXX789282593%41%30%26%
5-SepYY578778605%29%3%38%
6-SepZZ8671796137%40%2%48%
7-SepAA5051739847%50%1%27%
8-SepBB6061948140%50%47%19%
9-SepCC9551595526%22%37%3%

 

And I need to transpose it down to five columns (Date, Region, Group, and a Number & Percent column) like below. However, since the columns are named similarly yet different, I'm having issues figuring out how to get this to transpose correctly. Any advice? Data attached for reference, thanks so much in advance!

 

DateRegionGroupValue%
1-SepXXGroup 19426%
1-SepXXGroup 27622%
1-SepXXGroup 36610%
1-SepXXTotal572%
5 REPLIES 5
BenMoss
ACE Emeritus
ACE Emeritus

Hi!

 

There's quite a simple solution to this problem by first transposing all of your columns, using a logic to pull out the metric type and the group, before cross-tabbing the data into the structure you desired.

 

2018-11-28_06-55-14.png

 

Example attached.

 

Ben

BenMoss
ACE Emeritus
ACE Emeritus

Hi!

 

There's quite a simple solution to this problem by first transposing all of your columns, using a logic to pull out the metric type and the group, before cross-tabbing the data into the structure you desired.

 

2018-11-28_06-55-14.png

 

Example attached.

 

Ben

ponraj
13 - Pulsar

Here is the sample workflow for your case. Hope this is helpful. 

 

WorkflowWorkflowResultsResults

drewh
7 - Meteor

Hi All - thank you so much for the quick responses! Any chance I can get the workflows in Designer 10.0 format? Sorry, forgot to mention I'm a few revs back...

 

Thanks so much!!

BenMoss
ACE Emeritus
ACE Emeritus
You can follow this post to downgrade the workflow:

https://www.theinformationlab.co.uk/2018/07/12/downgrading-alteryx-workflows/

Ben
Labels