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

Transform

phoebe_90
8 - Asteroid

How to transfer A into B

A

Expense Type
Transportation 3% – Online ride-hailing (China Only)
Transportation 9% – Train (China Only)

B

Expense rate
3%
9%
5 REPLIES 5
ArnaldoSandoval
12 - Quasar

Hi @phoebe_90 

 

You can use the following regular expression:

 

.*\s(\d*%)\s.*

 

RegExp-01.png

Regular Expression Tool:

RegExp-02.png

 

Note, the regex parses #% and ##% and ###% it does not handled decimal points.

 

Hope this helps,

Arnaldo

BRRLL99
11 - Bolide

Use Regex Tool and try this formula \d+%

flying008
15 - Aurora

Hi, @phoebe_90 

 

1- By RegEx tool of Parse method:

 

([0-9.]+?%)

 

2- Use formula :

 

Substring([Expense Type],FindString([Expense Type], ' ') + 1,FindString([Expense Type], '%') - FindString([Expense Type], ' '))

 

录制_2023_07_31_12_27_39_302.gif

binuacs
21 - Polaris

@phoebe_90 The regex tokenize would do the trick

image.png

grazitti_sapna
17 - Castor

Hi phoebe_90

You can use a RegEx tool and use the expression \d+% with output method as Tokenize

Thanks!

Sapna Gupta
Labels
Top Solution Authors