Number Formatting - Remove decimal places from currency format in Table

791
4
07-16-2021 03:18 PM
Lau_Olivia
New Contributor II

I am displaying an inserted table in my map layout that shows projects and an associated dollar ($) amount, but I'd like to get rid of the decimal units because my amounts are in the millions. Is there a way to remove the decimal amount so the table just shows $4,000,000 vs $4,000,000.00? I tried changing the number format to "Numeric" to remove the decimals, but then I lose the "$" sign. 

Lau_Olivia_0-1626473490763.png

 

0 Kudos
4 Replies
KoryKramer
Esri Community Moderator

I did this with a custom format string:

KoryKramer_0-1626475921749.png

Does that work for you?

0 Kudos
Lau_Olivia
New Contributor II

The Custom setting was my original solution, but the problem is that there are projects not receiving funding that need to be displayed in the table. I'd like to show up as "$0". The issue with the custom format, is that the "," comma separators show up when I don't want them to for the non-funded projects, so the numbers display is even worse.

Lau_Olivia_0-1626477294913.png

 

0 Kudos
KoryKramer
Esri Community Moderator

What if you created a text field used to display the cost.

The Cost field in my example is a Float, so in this expression, I cast it to an integer so there is no decimal.  I don't think you'd have to do that if you are already working with an integer.

'$'+ "{:,}".format(int(!Cost!))

KoryKramer_0-1626478884201.png

 

KoryKramer
Esri Community Moderator

@Lau_Olivia please see this new idea that was just posted and add your kudos to support it. Sounds like it is what you would be looking for as well: https://community.esri.com/t5/arcgis-pro-ideas/add-a-prefix-to-numeric-number-format-options/idi-p/1... 

0 Kudos