Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parse string to numbers

wenyg
8 - Asteroid

Hi, How do parse P1000 into 1000? It will always start with "P" and following with 4 digits.

4 REPLIES 4
ShankerV
17 - Castor

Hi @wenyg 

 

One way to do is.

 

ShankerV_0-1681125445167.png

 

ShankerV_0-1681125485175.png

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @wenyg 

 

Another way to do this using regex.

 

ShankerV_0-1681125611777.png

 

(\d{4})

 

ShankerV_1-1681125633662.png

 

 

Many thanks

Shanker V

binu_acs
21 - Polaris

@wenyg Another way of doing this

binuacs_0-1681126092094.png

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@wenyg ,

 

 if the string is always P followed by 4 digits, the data cleanse and Regex are expensive overkill.  

right([field1],4) is the easiest way. 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors