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
Solved! Go to Solution.
But this makes the numbers as strings right? Then can it still be calculated as numbers when exported to excel?
How could we do the reverse of this? From String to Number with the same formatting?
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.
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.
I was searching for this function and this works for me as well.
thank you so much. This is great !!!
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.