Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to trim last two dgits

Saravanan13
8 - Asteroid

Hello,

 

I am looking to trim the last digits of "ID" column, Can anyone assist on this

 

IDExpected output
555552555555
170123517012
170124517012
280129928012
280124928012
555553555555
2 REPLIES 2
ShankerV
17 - Castor

Hi @Saravanan13 

 

There are many ways to achieve this output.

 

In the formula tool, use the below

 

Left(tostring([ID]),5)

 

Screenshot 2024-05-03 143423.png

Note: Assumption made that the ID column length is 7

aatalai
15 - Aurora

Agreed with @ShankerV there are many ways. I've attached a workflow that is slightly more dynamic, i.e will work if the column length is not 7. Let me know how you get on

Labels
Top Solution Authors