community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Knowledge Base

Definitive answers from Designer experts.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE

Concatenating and adding (integer) fields

Alteryx
Alteryx
Created on

In Alteryx, the + (plus) symbol has different functionalities depending on if you are using text (string) or numeric fields.

 

If you use + with text fields, it will concatenate them, e.g. "Mary had" + " a little lamb" -> "Mary had a little lamb"

 

If you use + with numeric fields, it will add them, e.g. 1+2 = 3

 

What if you want to concatenate your numeric fields? If you convert them to string fields first, Alteryx will concatenate instead of add. To convert to a string field, us the tostring() function.

This example illustrates the difference between concatenating and adding for numeric fields (NOTE: NumbersCombined is a string field, NumbersAdded is an integer):

 

concatimage.png

 

The tostring() function also lets you format your data by defining the number of decimal places and adding comma separators if needed.

E.g. tostring([Sales],2,1) converts the double to a string keeping 2 decimal places and adding commas for easy readability:

 

concatworkflow.png