Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Retaining the standard number of characters in a text

dunkindonut7777
8 - Asteroid

Hi I have a question. I have a data here with values that I need to trim into 10 characters only. So I need to remove the excess characters that beyond 10.

 

DescriptionLength
OUTSIDE SERVICES16
COST OF SALES13
OPERATING EXPENSE17

 

I want to retain the characters up to 10 only including space.

 

3 REPLIES 3
binuacs
21 - Polaris

@dunkindonut7777 One way of doing this withe the Left() function

 

https://help.alteryx.com/20221/designer/string-functions

 

binuacs_0-1659516654217.png

 

IraWatt
17 - Castor
17 - Castor

Hey @dunkindonut7777,

You could use the left function in the Formula Tool String Functions | Alteryx Help.:

Left([Description], 10)

The Left function returns a number of characters starting from the left. The first parameter is the text the second is the number of characters to return. (example attached below).

IraWatt_0-1659516730782.png

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 

 

 

 

davidskaife
14 - Magnetar

Hi @dunkindonut7777 

 

A quick way of doing this is setting the field length to 10 in the select tool

 

DavidSkaife_0-1659516892920.png

 

 

Labels
Top Solution Authors