Hi,
I have something like this:
GroupA | GroupB | |||||
Title1 | Title2 | Title3 | Title1 | Title2 | Title3 | |
2019-1-1 | 000 | 111 | 222 | 333 | 444 | 555 |
2019-1-2 | 666 | 777 | 888 | 999 | 123 | 456 |
And I want to have like following:
Group | Date | Title1 | Title2 | Title3 |
A | 2019-1-1 | 000 | 111 | 222 |
A | 2019-1-2 | 666 | 777 | 888 |
I couldn't find a good tool for this. Could you please show me how to do this in Alteryx?
Thank you
Solved! Go to Solution.
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.
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.
Hope this is helpful. Let me know if you have any questions about any of the steps!
-Luke
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.
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!