This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi - what is the best way to convert these from string to numbers. I have tried and it keeps returning just the numbers before the comma. I can't remove all punctuation because I also want to keep the decimal place. thanks!
4,006,213,560.39
19,905 386,716.32
108,471
2,108,988.82
72,053,698.07
1,453,328.96
2,364,943.17
Solved! Go to Solution.
I like replace_char([field],",",'')
you could put a list of vale's in there as ",$%#+()"
cheers,
mark
Thanks, that worked. I also have numbers that are like this:
874.19-
How would I make that into a negative number? I am thinking an if formula, but not sure how to tell Alteryx to add - to the beginning of the number and remove it from the end.
If right([field],1) = "-" Then
- tonumber(replace_char([field],",-"))
else
tonumber(replace_char([field],","))
Endif
cheers,
mark
Good and easy solution. Thank you.