ArcGIS Pro doesn’t label values as they appear in the table,
I couldn’t figure out why ArcGIS Pro doesn’t label values (attached) as they appear in the table.
What could be the issue here?
Solved! Go to Solution.
This is how it has been working since ages in ArcMap and I see it much more logic that what we have now in the Pro. I hope that developers will consider this in their upcoming releases (I know that you will be saying that Pro is not ArcMap).
ArcGIS Pro 2.3 behaves the same as 2.3 when it comes to labelling. It doesn’t perform labelling according how values appear in the table
With Python, VBScript, and JScript expressions, the field values always passed through the field formatting of the layer and were brought into the label expression as strings. While that achieved your desired effect in this case, it caused problems in other scenarios where some expected raw field values. It also caused problems for portability as cases like feature services, web maps, and feature-linked annotation lacked the layer formatting. For Arcade, we made a conscious decision to pass the feature itself into the expression with raw field values. This itself is quite powerful as it provides access to geometry and arithmetic operations can be performed on raw data values.
As Wendy Harrison noted above, we have documented the difference in behavior here from the very introduction of Arcade. In future releases, we'll be revisiting layer field formatting with the goal of greater portability and look at whether we can default Arcade expressions on field insert to match field formatting in appearance much like we do for coded value domains.
Many thanks Craig for the input.
Then, for now, I’ll stick to the code provided by Robert in order to show the percent in the label
round(number($feature.AreaPercent_km * 100), 2) + "%"
Just to drop my 2 cents in here. I'm using ArcPro 2.5 currently, and this is still happening. In my layout legend, it was showing correctly, however, in my actual map, it was not. Thank you to Robert LeClair for the bit of coding help to get me past this minor, yet severely annoying issue.