HOW TO
In ArcGIS Dashboards, Arcade expressions can be used to customize how data points render for list, indicator, and table elements. Depending on the element configured, a data point can represent a feature or a summary statistic.
This article provides the steps to calculate the mean of an array of numbers and group the result into one column. The image below displays the summarized table of the average number of major events occurring in Germany.
var fs = FeatureSetByPortalItem(Portal('<portal URL>'), '<itemId>', <sublayerId>, ['<field_name_1>', '<field_name_2>', ..., '<field_name_n>'], false); var group_exp = [ { name: '<field_name_new>', expression: '(<integer_field_1> + <integer_field_2> + ... + <integer_field_n>) / <integer field count>', statistic: 'SUM'}] return GroupBy(fs,['<field_name_1>', '<field_name_2>'], <variable_name2>) return fs
Note: Specifying the fields and including Geometry 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