Alteryx Designer Desktop Discussions

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

Text to Columns

YLYONG
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 ANTWORTEN 5
Qiu
21 - Polaris
21 - Polaris

@YLYONG 
We can use a RegEx parse with below.

0+([1-9]\d+)

@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
Magnetar

Hi, @YLYONG 

 

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

 

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

 

 

YLYONG
Comet

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

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

Thanks!

Sapna Gupta
Umfrage
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Beschriftungen