HOW TO
In ArcGIS Dashboards, Arcade expressions can be used to customize how the data points render for the list, and pie chart elements. Depending on how the element is configured, a data point can represent a feature or a summary statistic.
This article provides the steps to generate distinct features from a table and display them in a list, pie chart, and serial chart for better clarity. The image below displays a list and a pie chart of incidents by condition.
var portal = Portal('<portal_URL>'); var <variableName1> = '<itemID>'; var <variableName2> = FeatureSetByPortalItem( portal, <variableName1>, <sublayer_ID>, ['<field_name_1>', '<field_name_2>', ..., '<field_name_n>'], false); return distinct(<variableName3>, '<field_name_n>')
var portal = Portal('<portal_URL>'); var <variableName1> = '<itemID>'; var <variableName2> = FeatureSetByPortalItem( portal, <variableName1>, <sublayer_ID>, ['<field_name_1>', '<field_name_2>', ..., '<field_name_n>'], false) var <variableName4> = GroupBy(<variableName3>, distinct(['<field_name_n>']), [{ name: '<field_name_new>', expression: '<field_name_n>', statistic: '<statistic type>' }]) return <variableName4>
Note: Specifying the fields and includeGeometry parameters in the FeatureSet are optional expressions for the FeatureSetByPortalItem() function. Refer to ArcGIS Arcade: FeatureSetByPortalItem for more information.
Get help from ArcGIS experts
Download the Esri Support App