Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Text to Columns

YLYONG
9 - Comet

 

hello!

May I know how do I remove the zeros at the front of below numbers?

 

P. TU IDP. TU ID
000202642460202642460
000202642390202642390

 

YLYONG_0-1656645128175.png

 

Thank you for your help!

5 REPLIES 5
Qiu
20 - Arcturus
20 - Arcturus

@YLYONG 
We can use a RegEx parse with below.

0+([1-9]\d+)
grazitti_sapna
17 - Castor

@YLYONG, text to column reads only 1 delimiter, so in case you want to remove starting 000 you can try this,

grazitti_sapna_0-1656649097952.png

Formula:

if StartsWith([P. TU ID],"000") then
tonumber(ReplaceFirst([P. TU ID],"000",""))
else tonumber([P. TU ID]) endif

 

I hope this helps!

 

Thanks!

 

 

Sapna Gupta
flying008
14 - Magnetar

Hi, @YLYONG 

 

the easy formula for you, also can add tonumber() for the outside if need.

 

TrimLeft(tostring([P. TU ID]),'0')

 

 

YLYONG
9 - Comet

@Qiu @grazitti_sapna @flying008 Thank you all for your suggested solutions!

grazitti_sapna
17 - Castor

@YLYONG, if these solutions worked for you please mark them as solutions so they can help others for future reference.

Thanks!

Sapna Gupta
Labels