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

Restructuring/ Grouping : cross tab & transpose

Madooxno9
6 - Meteoroid

Hello All, 

 

I would highly appreciate any help or guidance on this one. 

 

I am struggling to re-arrange my raw data from the tabular column format to horizontal format. I am new to Alteryx and kind of stuck at this stage. 

 

Raw Data is in the first sheet and desired format in the second one. 

 

 

Thank you!  

7 REPLIES 7
JoshuaGostick
11 - Bolide

Hi @Madooxno9,

 

 

I've built a workflow that should set you on the right way. What I did was combine the values to be used as the new field titles into one value, and then used these new values to crosstab.

 

Transpose and Cross Tab.PNG

 

The output isn't formatted exactly like it is in your excel spreadsheet because you normally work in a tabular format with Alteryx. However, let me know if you need help in formatting it exactly like it is in the excel file.

 

Thanks,

Josh

afv2688
16 - Nebula
16 - Nebula

Hello @Madooxno9 ,

 

Hope this helps

 

Regards

Madooxno9
6 - Meteoroid

Hi 

 

 

 

 

 

danilang
19 - Altair
19 - Altair

Hi @Madooxno9 

 

Building on @JoshuaGostick's excellent start, here's a workflow that splits the column names into rows

 

w.jpg

The bottom branch is what I added.  It uses the Field Info tool to get the metadata and then splits the column names into rows before crosstabbing and renaming to get the original column names back.  These are unioned with the original data to give you

 

r.jpg

 

Dan 

JoshuaGostick
11 - Bolide

Hi @Madooxno9,

 

The workflow I've attached should convert your data exactly like it looks like in the excel file. The workflow might be slightly more complicated than necessary because I tried to keep it as dynamic as possible. Let me know if this works for you or if you have any issues.

 

Thanks,

Josh

Madooxno9
6 - Meteoroid

Thank you JoshuaGostick

 

Your solution is really what I needed. Thank you once again.

Madooxno9
6 - Meteoroid

Hi danilang, 

 

Thank you for the help and this is what I have been looking for. Your and JoshuaGostick solutions are really helpful and I am thankful for your time. 

Labels