ArcGIS Pro 2.5: How to show thousands separator on labels?
I couldn’t figure out how to show thousands separator on labels. In ArcMap, the format of labels respects the format of values in the attribute table. This is sounds not to be applicable in Pro
If the vbscript or jscript languages are used then the format in the table is reflected in the map label as shown in the screenshot below. This fails in case of python or arcade
Arcade labels ignore the numeric formatting in the feature class, making it necessary to format the field in the label expression. It's an annoyance, but it does allow for the same field to be formatted in multiple ways, either in the same or in separate expressions.
Example - I often label polygons with their area values in both square feet and acres, using some variant of the following:
Text($feature['SHAPE.AREA'], '#,###sf') + textformatting.newline + Text($feature['SHAPE.AREA']/43560, '(#,###.##ac)')
This gives me a multi-line label with the square foot area on the first line, and the acreage (in parentheses) on the second line, i.e.
1,600sf
(0.04ac)
The format in the Text tag ('#,###.##ac') adds thousands separators, specifies two decimal places, and adds the textual suffix to the value, and of course the /43560 divides the square footage to obtain the acreage.
Example:
Text($feature.Density, '#.###')