The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parse string to numbers

wenyg
Astéroïde

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

4 RÉPONSES 4
ShankerV
Castor

Hi @wenyg 

 

One way to do is.

 

ShankerV_0-1681125445167.png

 

ShankerV_0-1681125485175.png

 

Many thanks

Shanker V

ShankerV
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
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.
Étiquettes
Auteurs des meilleures solutions