ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

How to combine 2 columns into one

Jay2022
アステロイド

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件の返信5
DataNath
17 - Castor
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
アステロイド

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
コメット

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

 

vlad_kutateladze_0-1664907353415.png

 

vlad_kutateladze_0-1664907244169.png

 

 

Jay2022
アステロイド

@vlad_kutateladze  that works for me! thank you!

juan1
メテオール

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!

ラベル
トップのソリューション投稿者