Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

How do I extract $value without the $ sign into a new field?

AlYap
7 - Meteor

Hi, 

 

I am trying to extract the numbers only from a field of strings. Example below:

 

Project Total- $463.2MM. Approved

RT:$134.0MM but current pending review.

Approved total - $198,336,058, routed for PO.

 

Expected output:

463.2

134.0 

198.3

 

Is there a way I can do this based on the variability of some numbers shown in MM, and some in the full value? Otherwise can someone help how I can just extract the value after the "$" sign? Any help welcome. 

5 REPLIES 5
Qiu
21 - Polaris
21 - Polaris

@AlYap 

I tried with RegEx and hope this is what you need.

Capture1.PNG

mpennington
11 - Bolide

My formula was a bit different, but I got it to work as well. Probably should have wrapped this in a Tonumber, as @Qiu did.  

 

IIF(REGEX_Match([Field1], '.*\$(\d+),(\d)\d+,.*'), REGEX_Replace([Field1], '.*\$(\d+),(\d)\d+,.*', '$1\.$2'), REGEX_Replace([Field1], ".*\$(\d+\.\d)MM.*", "$1"))

 

Edit: Couldn't help myself, here is the Tonumber formula:

 

TONUMBER(IIF(REGEX_Match([Field1], '.*\$(\d+),(\d)\d+,.*'), REGEX_Replace([Field1], '.*\$(\d+),(\d)\d+,.*', '$1\.$2'), REGEX_Replace([Field1], ".*\$(\d+\.\d)MM.*", "$1")))

 

Match.png

AlYap
7 - Meteor

Wow. Thank you so much @Qiu. This works! 

Qiu
21 - Polaris
21 - Polaris

@AlYap 
Glad to help and thank you for the accept mark.

AlYap
7 - Meteor

.@Qiu was wondering if you may be able to help with another of my query here.

Labels
Top Solution Authors