HOW TO
In Map Viewer, it is possible to label numeric data in a feature layer by calculating the difference between multiple field values and comparing it with a fixed value using an Arcade expression. This is useful for dynamically highlighting variations within the geographic dataset and quickly identifying patterns, trends, or anomalies.
In this article, the feature layer contains two fields named Income and Expense. Using an Arcade expression, labels are created by calculating the difference between the two field values, and the difference is compared to a fixed value of 5000.
var <variable1> = $feature.<field_name1>; var <variable2> = $feature.<field_name2>; var <variable3> = <value>; if (<variable1> - <variable2> > <variable3>) { return "<output1>"; } else if (<variable1> - <variable2> < <variable3>) { return "<output2>"; } else { return "<output3>"; }
The image below displays the labels with the field value differences on the web map.
Get help from ArcGIS experts
Download the Esri Support App