HOW TO
In some instances, an attribute value in percentage is written in decimal values when displayed in labels on web maps in ArcGIS Online. In this article, an Arcade expression is used to convert the decimal values to percentages and display the percentages in labels. In this example, the field used to display the percentages as decimal values is 'Ratio’.
The image below displays labels with decimal values in ArcGIS Online.
Note: Ensure labels are enabled, refer to ArcGIS Online: Apply labels for instructions.
IIf($feature.<field_name> == 0.00, null, ($feature.<field_name> * 100) + "%")
Note: For multiline labels, specify the expression as follows.
'<field_name>:' + $feature.<field_name> + TextFormatting.NewLine + '<field_name>:' + $feature.<field_name> + TextFormatting.NewLine + '<field_name>:'+ IIf($feature.<field_name> == 0.00, null, ($feature.<field_name> * 100) + "%")
The image below displays the percentage labels on the web map in ArcGIS Online.
Get help from ArcGIS experts
Download the Esri Support App