Free Trial

Alteryx Designer Desktop Discussions

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

Text to Number

pgolightly
5 - Atom

I have parsed a 400 character string from a .txt file in Input Data to 91 fields with set lengths based on a specified matrix using the 'Read as a fixed width text file'  option from the Resolve File type box that opens when the .txt file is selected.  One field needs to be converted from text to a four decimal number as shown. The text field contains no decimal point so removing the leading zeros doesn't work because it converts '000000437 to 437.

 

'000000437 to 0.0437

'000012587 to 1.2587

 

Thanks

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

ToNumber(left([input],5)+'.'+right([input],4))

 

that should do do the trick. 

 

Cheers,

mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Joe_Mako
12 - Quasar

How about:

ToNumber([Field])/10000
Labels
Top Solution Authors