Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More

Concatenating multiple fields


@JoeM - per your request, copied over my Idea posting so that you can attach the macro for Concatenating multiple fields :) Thank you thank you!!


From original Idea post:

I find that to do a simple concatenation of multiple fields, it takes multiple tools where it seems one would suffice. For example, if I had an address parsed into multiple fields (House Number, Street, Apt, City, State, Zip Code, Country), to combine these into a single address field, I'd have two options: Formula that manually adds each field with +' '+ in between each field, which is a lot of typing and selecting...Or Transpose data and then Summarize (concatenating) the values field with a space delimiter between each record.
Seems to me that a simpler solution would be a concatenate tool that might look and feel much like the Select tool, allowing you to choose a name for your concatenated string, input a delimiter, select the fields to concatenate, and re-order them within the tool. Bonus if it automatically converted everything to string fields (or at least allows you to designate whether you want to concatenate all your fields as numbers or strings, and then translates accordingly). Extra bonus if you also had the option to put a different delimiter after every field...
Not a super complex thing to do this task with the given tools, but it does seem like a fairly straightforward add that would likely save a whole bunch of folks at least a few minutes here and there.


The attached macro can do most of what you are asking for. The one thing it cannot do is "re-order them within the tool", but you can get that if you use a select tool to arrange the fields manually before the macro.




Could you go through an example with the macro? I am going through the same task of trying to concatenate a large number of rows but can not get it to work in the macro.  


Attached is an example use of the macro.


If you are wondering how to you get the macro tool into your workflow, one way to do this is have the macro open in another tab, right-click in the canvas, choose Insert->Macro->Concatenate. Then you can configure the tool as normal. The default deliminator is a space.

insert macro.png


Alteryx Partner

I just wanted to say this macro is FANTASTIC. This just saved us a ton of time concatenating over 650 columns together into one. We had messy truncated text fields from a vender that we had to input and this made things go SO smoothly.


Thank you Nicole for opening this thread and Joe for providing the Macro.


This is what the community is for.




Mark Lowrie

Thank you so much for the this! It is greatly useful. 

Though I understand how to use the macro, I am having trouble understanding the steps in this macro.

Would you be able to provide a short description for each of these steps.


It would really help out beginners like myself.




Alteryx Partner

Very useful. Thank you!


Amazing macro - unbelievable - saved me typing calculations in Tableau or dragging multiple tools in Alteryx. Well-done!


Great macro, thanks!


This macro is a lifesaver. thank you!