Select to view content in your preferred language

ArcGIS Pro 2.5: How to show thousands separator on labels?

4863
10
02-28-2020 11:08 AM
JamalNUMAN
Legendary Contributor

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

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
10 Replies
GarmerWilliam
New Contributor

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.