We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Cloud Discussions

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

Can I add a prefix to data in a column?

Conner_Tri
Alteryx Alumni (Retired)

I need to prefix '0' onto all the values in a column.

Example: 2, 3, 6 should become 02, 03, 06

2 REPLIES 2
Trifacta_Alumni
Alteryx Alumni (Retired)

While there are a few ways to accomplish this, the easiest, in my opinion, is to Apply a formula [set] to your column (see here: https://docs.trifacta.com/display/PE/Set+Transform) using the MERGE( ) function (see here: https://docs.trifacta.com/display/PE/MERGE+Function).

 

This would follow the form:

Transformation: set

Columns: your_column

Formula: MERGE(['0', your_column])

Trifacta_Alumni
Alteryx Alumni (Retired)

In your case, the recipe step would be:

set col: your_column_name value: merge(['0',$col])