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
14 - Magnetar

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
20 - Arcturus

@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