Alteryx Designer Desktop Discussions

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

PARSE DATA

dunkindonut7777
8 - Asteroid

Hi All,

 

I want to know how to parse these characters. I only want to extract the first 6 digits, without touching the other value in column.

 

Sample:

NumberExpected Output
113302113302
CCD08CCD08
22 CCD INCD 0522 CCD INCD 05
540013.1540013
540321.19999999995540321

 

I just want to extract the first 5 digits in a characters with period. Can you help me with this one?

 

5 REPLIES 5
binuacs
20 - Arcturus

@dunkindonut7777 you want to parse the first 6 digits or 5 digits? You can adjust the below formula

image.png

dunkindonut7777
8 - Asteroid

hello can you provide the alteryx file or the formula so that I can copy paste and edit?, 

binuacs
20 - Arcturus

@dunkindonut7777 @I’m away from my system, I used your given input, just copy the given formula and try it should work

caltang
17 - Castor
17 - Castor

@binuacs I got you covered man.

 

@dunkindonut7777 please find binuacs' work here:

image.png

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

The formula is like this:

IIF(Length([Number]) < 6, 
[Number],
REGEX_Replace([Number], '(.{6}).*','$1'))

 

@dunkindonut7777 kindly mark binuacs' post as the solution. Thanks!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels