Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Merging columns with a delimiter

Inactive User
Not applicable

Hi, I am trying to merge 3 columns and include a delimiter.

 

Example data:

Type 1Type 2Type 3
ab 
b  
c  
abc
   

 

My current method is to use the formula tool to generate a new column 'Types' with [Types]=[Type 1] + ', ' + [Type 2] + ', ' +[Type 3]

 

However this leaves multiple ', ' in many rows and it looks quite messy.

 

Would anybody be able to provide a solution that would allows me to merge columns and include a delimiter without this happening?

 

Thanks

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @Inactive User 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1604488175829.png

Formula:

Trim(Replace(Trim([Type 1]," ") + ', ' + Trim([Type 2]," ") + ', ' +Trim([Type 3]," "), ", ,", ", "),", ")

Workflow:

atcodedog05_1-1604488193832.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

Inactive User
Not applicable

Thank you that works perfectly!

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @Inactive User 

 

Cheers and Happy Analyzing 😀

PJ10
5 - Atom

I have exactly same issue but the challenge I am facing is that instead of 3 columns, I have around 28 columns. Can someone help?

Labels
Top Solution Authors