Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
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

2 REPLIES 2
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