Alteryx Designer Desktop Discussions

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

How to combine 2 columns into one

Jay2022
8 - Asteroid

hello,

I have this flow were I need 2 columns to become one. I'm not sure which tool to bring in to do so for me.

 

thank you

5 REPLIES 5
DataNath
17 - Castor

Hey @Jay2022, for this you can just bring a Formula tool onto the canvas and use an expression like:

 

[Field1]+[Field2]

If they’re different data types then you may need to wrap them in certain functions or use a select tool beforehand and if you want spaces or punctuation between them then you’ll need to use something like [Field1]+” “+[Field2] but let us know. Hope this helps!

Jay2022
8 - Asteroid

Thank you @DataNath  but I forgot to mention that I need each data to be its own row. They are the same data type so I need 2 columns to come out as one. Example if  I have 5 rows in column 1 and 10 in column 2 I need column 3 to have 15 rows.

vlad_kutateladze
8 - Asteroid

@Jay2022 You can just use the Transpose tool in this case. 

 

vlad_kutateladze_0-1664907353415.png

 

vlad_kutateladze_0-1664907244169.png

 

 

Jay2022
8 - Asteroid

@vlad_kutateladze  that works for me! thank you!

juan1
7 - Meteor

Hello @Jay2022 ,

 

The solution by @vlad_kutateladze works well, but here is another way to solve this. 

 

Do 

[Field 1] + "," + [Field 2]

 

Then use "Text to columns" --> split to rows. Filter out empty rows.

 

juan1_1-1664908045845.png

 

Hope this helps!

Labels