Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to change the format of numeric values?

schee013
5 - Atom

Hello Community! I have a set of data where the numeric values are in this format:-

 

20.491.802,46 (Note that the thousands separator is "." instead of "," and the decimal point is "," instead of ".")

 

I would like to change it so that the thousands separator is "," and the decimal point is ".", hence the end result should look like 20,491,802.46

 

I tried using the replace function to first replace the "." to "," and then replace the "," to ".", but it doesn't seem to work because the thousands separators that was just replaced to "," would be replaced again to ".".

schee013_0-1637817062600.png

 

Appreciate any ideas on how I can go about this.

 

Thank you for your help! 😊

 

3 REPLIES 3
mbarone
16 - Nebula
16 - Nebula

Kind of a sneaky way to do it, but I like the following:
Replace(Replace(Replace([Value],',','|'),'.',','),'|','.')

 

First replace the comma with a pipe.  Then replace the decimals with commas, then replace that pipe with the decimal 🙂

schee013
5 - Atom

Genius!!!! Thank you!

mbarone
16 - Nebula
16 - Nebula

Sure thing!

Labels
Top Solution Authors