Hello,
I'm building a Dashboard containing a serial chart which displays multiple bird species and the counts of males, females, young, and unknown.
![DaveK_1-1678884161491.png DaveK_1-1678884161491.png](https://community.esri.com/t5/image/serverpage/image-id/65315i5F958E848F6B6580/image-size/medium?v=v2&px=400)
![DaveK_3-1678884253578.png DaveK_3-1678884253578.png](https://community.esri.com/t5/image/serverpage/image-id/65317i301FEDAB4CA71EC0/image-size/medium?v=v2&px=400)
I would like to sum the number of bird fields for each row into a new field (totalCount) using a data expression. Can anyone help me put together an expression that will do that? Here's where I ended up with my own expression that doesn't work.
var fs = FeatureSetByPortalItem(portal, 'HidingthefeatureID',0,
['uplandBird','adultMales','adultFemales','young','unknown'],false);
var totalcount = {
'fields': [{'name':'sumtotal', 'type':'esriFieldTypeDouble'}],
'geometryType': '',
'features':
[{'attributes':
{'sumtotal': (fs,'adultMales'+fs,'adultFemales'+fs,'young'+fs,'unknown')
}}]};
return FeatureSet(Double(totalcount));
Any help is appreciated.
Thanks.