Hello,
I am working on a data expression in Dashboards (ArcGIS Online) that returns the Count of features by Location. I have that part figured out, but I'd like to also return the predominant value from another field ('categories'). How would I go about doing that.? Below is my expression that returns the features grouped by location.
Ideally, I want a List that shows: "Country, Total Incidents, Predominant Incident Categories is ___."
Any advice is much appreciated, thanks!
// return fs that is grouped by 'Location' and gets 'COUNT' of features for that location
var fs = FeatureSetByPortalItem(Portal('https://myorg.maps.arcgis.com/'), 'myItemID', 0, ['Location'], false);
return GroupBy(fs, ['Location'],
[{name: 'total_incidents', expression: 'Location', statistic: 'COUNT' }
]);