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

General Discussions

Discuss any topics that are not product-specific here.

Want to put "&" formula

Maheshp
8 - Asteroid

Hi,

 

I am preparing a workflow but I want to make a unique id to merge "Name and Amount" together with the help of "&" formula, below is the example.

 

Can you please guide me how can I run this formula in Alteryx.

 

Maheshp_0-1660127407351.png

 

Regards,

 

Mahesh

 

 

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

Hey @Maheshp, you can just use a Formula tool with the following expression - you'll need the ToString() function as your Amount field is Numeric and the combination will leave you with a String data type due to bringing in the Name field:

 

[Name]+ToString([Amount])

 

DataNath_0-1660127785519.png

IraWatt
17 - Castor
17 - Castor

Hey @Maheshp,

Two things to note here:

One - String concatenation in Alteryx uses the + not the & 

Two - As Ammount most likely is a number type you will need to convert it to a string (text data) first.

 

You can change the type with a Select tool then apply the below formula with a formula tool:

IraWatt_0-1660127929568.png

 

[Name]+[Amount]

 The community has some quick and easy videos on formulas and the Formula Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20...

 

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

Labels