Hi,
I am very new to alteryx and am struggling with the below.
I have the following
col A col B col C
a x1 y1
b x2 y2
and want the following
col A col D
a x1
a x2
b y1
b y2.
i.e. I want to merge the two columns, but still have the data separated with the data in col c to be underneath the data in col b.
Please could I get some help.
Thanks
Solved! Go to Solution.
Hi @mlp
Try using the transpose tool. It makes your data tall when your current data is wide.
Let me know if you don't come right.
Cheers
Kat
Hey @mlp
While I would normally use the Transpose tool for something like this, I'm not sure that you're guaranteed to keep column C after column B as you are wanting.
As an alternative, I would suggest using two Select tools from your Input. One will keep Col A and Col B and the other one will keep Col A and Col C. Then just use a Union tool and choose Auto Config by Position and set the output order. See the sample workflow attached.
Hope this helps!
Hi,
Thanks so much for your reply.
Is it possible to do this union so that instead of keeping two columns after, merging them into one column?
Thanks
@mlp Could you provide an example of what you mean? The workflow attached previously merges your Col B (2 rows) and Col C (2 rows) into one column (4 rows). Are you also wanting to merge with col A?
sorry I mean exactly what you had done in the workflow earlier, except this hasn't happened on my workflow as I still have separate columns. in the top select I have ticked col a and col b, in the bottom select I have ticked col a and col c, and then in the union I have done what you have said. except I still have col a b and c
@mlp Double check that you have selected "Auto Config by Position" at the top of the configuration of your Union tool. Then, to ensure you get them in the correct order, set the output order depending on the order you connected the tools (i.e. which stream is #1 and which is #2). See the pink circles below.