In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex for numerical value formatting

jl4357
6 - Meteoroid

Hi there,

 

I have a column (string) with various types of data, including text and numerical values. I am hoping to format the numerical values as follows - 12345.6789 to $12,345.68 - but haven't been able to get a regular expression working. I've included a sample of the values, before and after, below.

 

Can anyone help with creating an expression that would achieve this?

 

Thanks for your help!

 

Screenshot data.png

6 REPLIES 6
binu_acs
21 - Polaris

@jl4357 One way of doing this

image.png

jl4357
6 - Meteoroid

Thank you very much for this! I tried it out and it is working.

 

Do you know of a way to add the thousands delimiter/comma to this formatting as well?

binu_acs
21 - Polaris

@jl4357 @Update the toString function by adding 1 after the 0.01 argument 

 

eg:

 

ToString([Field], 2,1)

binu_acs
21 - Polaris
caltang
17 - Castor
17 - Castor

@binu_acs lightning fast response man! 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
jl4357
6 - Meteoroid

Perfect, thank you for the quick response and very helpful solution!

Labels
Top Solution Authors