Dear All, I am trying to calculate the sum of values grouped by two fields, however it returns null values and, in addition to this, it seems it doesn't group at all (see image attached).
Any idea?
My dahboard is running on Portal for Arcgis 11.1.
Thank you in advance.
Here is the code:
var myPortal = Portal('https://www.myportal.it/portal');
var itemId = '123456789';
var layerId = 0;
var fs = FeatureSetByPortalItem(myPortal,itemId, layerId,
['cod_reg','anno','csuolo8','clammi3_num'],false);
Console('Somma clammi3_num: ', sum(fs,'clammi3_num'));
Console('primo record: ',First(fs));
return GroupBy(fs, ['anno','cod_reg'], [
{name: 'sum_clammi', expression: 'clammi3_num', statistic: 'SUM' },
{name: 'sum_csuolo', expression: 'csuolo8', statistic: 'SUM' }
]);
Hello,
I have the same problem (on Arcgis 10.9.1). I really don't get why it does not work. I ended up copying the data in a new FeatureSet the same way it is done in this subject https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-groupby-not-groupin...
I am not quite satisfied that the normal way does not work but still, it prevents from creating new tables in the database. I hope it can be useful as much as I hope someone will find a better way to do it 🙂