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

How to split the table

Yuko_dup_386
5 - Atom

Hi,

 

I have something like this:

 GroupA  GroupB  
 Title1Title2Title3Title1Title2Title3
2019-1-1000111222333444555
2019-1-2666777888999123456

 

And I want to have like following:

GroupDateTitle1Title2Title3
A2019-1-1000111222
A2019-1-2666777888

 

I couldn't find a good tool for this. Could you please show me how to do this in Alteryx?

 

Thank you

4 REPLIES 4
BrandonB
Alteryx
Alteryx

I would probably start the data import on row 2 to skip the group names, then branch the workflow off into two separate select tools. The first select tool you should deselect the last three titles and the second select tool you should deselect the first three titles and make sure it that the second set of titles is named consistently. Then use a formula tool after each of the select tools. Create a new column called Group and set the value to “A” for the top formula and “B” for the bottom formula. Finally you can connect the results of both of the formula tools in the different streams together with a union tool. This should stack the resulting data together and get you the format that you need.

LukeG
Alteryx Alumni (Retired)

@Yuko_dup_386 

 

Here is a workflow I built that will get to your solution. I imagine that it is dynamic enough to work no matter how many Groups/Title will appear. Just need to pivot the data, join the different pieces together and pivot it back.

 

LukeG_0-1576940410129.png

 

Hope this is helpful. Let me know if you have any questions about any of the steps!

 

-Luke

Yuko_dup_386
5 - Atom

Hi Brandon, thank you for your quick reply. It sounds work well!

Although I got a feeling that it would be better to form the input data into a good structure before using Alteryx.

Yuko_dup_386
5 - Atom

Hi Luke, thank you for the workstream! It seems the solution. I didn't know the pivot data tool. I will study the tool and try the process. Thank you very much!

Labels