Hi guys - in Alteryx - how do you convert a string into a number? Basically my data comes in as a string with a dollar sign from the souce and I want it converted to a number so I can aggregate it.
Eg:
$1,234.50 should be 1234.50
Thanks
You need to get the dollar sign and commas out of the string and then just use the ToNumber() function.
Something like this in a Formula tool...
ToNumber(Replace(Replace([Data], '$', ''), ',' , ''))
Just to make the solution complete, here is the modified workflow with the three possible methods that I offered earlier...but accomodating for negative numbers (indicated by either a hyphen or parentheses).
To follow up on my previous post, as with most processes in Alteryx, this can be done a few different ways.
I am trying to learn better how to utilize RegEx for pattern matching kind of processes, so I have attached an example of at least three ways you could handle this in Alteryx. Two of them using RegEx.
Thanks - this was exactly what I needed.
And I will also look at the RegEd examples - helpful to know those too.
This function really works. I have the same problem few days ago but thanks to you i was able to fix it.
Great Job.