Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Formatting number with commas and decimals

anwarrington
6 - Meteoroid

Hello,

 

I am struggling to format numbers with decimals and commas. My source data, which is an excel file, has all numerical values rounded to 2 with a round formula. When I view the data from the input tool I see two decimal points (10.98). However, after being run through the join tool the formatting changes to (10.980000).

 

I have tried the tostring function. tostring([input_field),2,1) The out field created for this does not add the commas, or fix the trailing zeroes.

 

I also tried the regex_replace function. regex_replace([field],"\d{1,3}(?=(\d{3})+(?!\d))","$&,") This formatted fields with comma separators, but does not fix the trailing zeroes.

 

Has anyone run into this? Any advice or solutions are greatly appreciated!

Anna

15 REPLIES 15
JokeFun
8 - Asteroid

But this makes the numbers as strings right? Then can it still be calculated as numbers when exported to excel?

jacob_kahn
12 - Quasar

How could we do the reverse of this? From String to Number with the same formatting?

KLAMB
6 - Meteoroid

AL-t-E-ry-X - I can see with the Browse tool that my table(s) are formatting these correctly, with the 2 decimal places and automatically placing the commas.  But, then when I try to use the Summarize tool and output to an Excel file, the number fields again are unformatted when I open the Excel file.

alexm06
8 - Asteroid

Doing any further calcs to the numbers will cause them to revert back to being unformatted. I would try the summarize and then but the values into the table tool. 

You'd then need to use a render tool to output the formatted numbers into an excel doc.

avo
7 - Meteor

@anoopdk 

 

I was searching for this function  and this works for me as well. 

thank you so much. This is great !!!

 

 

 

 

Shagungupta95
5 - Atom

Could anyone please help with the comma separator correct formula to add in values, did try lot of trial and error methods but not helpful.

Labels