Alteryx Designer Desktop Discussions

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

Number formatting

jannis2021
6 - Meteoroid

Hi -
I am wondering if its possible to set up a generic multifield expression to fix common number formatting issues. Ideally it would handle several types of issues (i.e. parenthesis depicting negatives, trailing negatives, commas, etc. even if not all those issues are present. See the expression below for an example of what I am going for. Currently the results all show zero as none of my sample data have all the issues the expression is attempting to address. Any thoughts? Thanks.

 

Replace([_CurrentField_],",","")
AND
Replace([_CurrentField_],"(","-")
AND
Replace([_CurrentField_],")","")
AND
Regex_Replace([_CurrentField_],"(.*)\-$","-$1")

 

 

Sample #Expected Result

8,000.00

8000.00

(8,000)

-8000.00

8,000-

-8000.00
13 REPLIES 13
Treyson
13 - Pulsar
13 - Pulsar

Oh man. The Oasis reference is missed on me, that’s for sure. I would have gotten Brandon Flowers though.

Treyson Marks
Senior Analytics Engineer
apathetichell
18 - Pollux

@TreysonWe've all been there - but I clearly should have looked at your instagram first...

apathetichell
18 - Pollux

In my defense a large percentage of Alteryx gurus seem to be UK based btw - should have asked what John Carpenter track it was... I call dibs on Jimmy Chambers's "You Can't Fight It"

jannis2021
6 - Meteoroid

Thanks all for the replies. I apparently didn't have notifications on to email me when a response was obtained, apologies for letting this one linger as an open discussion!

Labels