Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!

SOLVED

Conversion errors using regex

nm518
7 - Meteor

Hi 

 

I'm trying to convert numbers in a format such as (0.64%) into double s.t. output is -0.0064. Have tried using regex in the formula tool as attached and the outcome is as expected but kicks off a ton of conversion errors


Any ideas how i can clean this up to avoid conversion errors?

 

Thanks in advance

Nish

cmcclellan
13 - Pulsar

This will work :

 

tonumber(
REGEX_Replace(
REGEX_Replace(
	REGEX_Replace([Value], "\%", "")
, 	"\(", "-")
, 	"\)", "")
)
/100

You weren't removing the closing bracket 🙂

nm518
7 - Meteor

perfect - thanks!

Labels