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

General Discussions

Discuss any topics that are not product-specific here.

Parsing out digits

lbolin
8 - Asteroid

I am wanting to check and see if the digit i have is 5 digits if it is longer than 5 digits I want to cut off the extra digits. 

Example:

544963 -----> 544963

928670000 -------> 92867

928675542 -------> 92867

72143 ------> 72143

 

 

 

 

 

 

 

3 REPLIES 3
ShankerV
17 - Castor

Hi @lbolin 

 

Please find the expected output.

 

tonumber(Left(tostring([Field1]),5))

 

ShankerV_0-1675712197774.png

 

ShankerV
17 - Castor

Hi @lbolin 

 

One more way to do this.

 

ShankerV_0-1675712533534.png

 

Many thanks

Shanker V

 

binuacs
21 - Polaris

@lbolin One way of doing this

 

binuacs_0-1675879887393.png

IIF(Length(toString([Digits])) >5 , toNumber(Left(toString([Digits]),5)), [Digits])
Labels
Top Solution Authors