For some reason one of my label expressions [year] is showing 6 decimal places when there should be none. A similar label [Age] shows properly without any decimal places. Both field are defined the same as numeric.
Expression:
[Year]&" "& [Project] &" "& [Age]&" yrs old"
Hi Robert,
could you send more information about the fields you're using to label? data type? length? were they preexisting fields from 10x? or were they newly added in pro?
thanks
Wendy
I just ran into the same problem in ArcGIS Pro 1.2. I imported a layer from an ArcMap mxd and enabled labeling (basic label engine) to show a Double field from a feature class in a file geodatabase, which was created in Desktop 10.3.1. When I go to Symbology-->Advanced-->Format Labels and change the number of decimals to be shown to 2 the labels do not change. Screen shot below.
Hi Greg - on the Symbology pane you're setting the labels for the layer in the Contents pane. To set labels on the features in the map you need to use the Label Class pane and set a label expression as you've done below with python.
Wendy
As a temporary workaround this should work:
left( [Year] ,4) &" "& [Project] &" "& [Age]&" yrs old"
Thanks, useful workaround. Using python worked for me:
round(float([Percent_diff]),2)
As a demo
>>> Year = 2016
>>> Project = 'Some'
>>> Age = 3
>>> "{} {} {} yrs old".format(Year,Project,Age)
'2016 Some 3 yrs old'
>>>
The python mini-formatting language handles conversions and you can specify formats. In the examples above, you can even use field names by enclosing them with exclamation marks should you ever need to pull stuff from a field (ie !Year! etc)
You could also try setting the number of decimal places to 0 in the field properties.