We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun 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
binuacs
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?

binuacs
21 - Polaris

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

 

eg:

 

ToString([Field], 2,1)

binuacs
21 - Polaris
caltang
17 - Castor
17 - Castor

@binuacs 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