Hi
I'm trying to use a table and by species display totals for Alive, Injured and Dead animals. I am trying to use an expression and return a featureset that displays the totals for each of the mentioned but can't get it right. The field i have as the Data populated as 'AOR', "DOR' and 'IOR'. How can i sum these by value and display them in the correct column? So for each species I need to know how many were alive, dead and injured for the entire dataset.
Thanks
I use the GroupBy expression like this to get the counts of each attribute in a field (Habitat).
var totalHabitat = GroupBy(fs, 'HABITAT', { name: 'HabTypes', expression: '1', statistic: 'COUNT' });
This gives me this table by setting the Category field to "Habitat" and getting the sum of the "HabTypes" field.
Thanks for the response.
I had tried something similar but it just counts the number of rows. It doesn't seem to care what value is in my "Alive" field.
How is your data formatted? Do you have individual fields for each category showing how many animals are in that category? Your initial description sounded like there was one field showing if it's alive, injured, or dead.
So it would be something like this:
Bullfrog AOR Mink DOR Bullfrog DOR Crow DOR
And what I would like to see in a table is
Species Alive Dead Injured Bullfrog 1 1 0 Mink 0 1 0 Crow 0 1 0
Finally got it working. thanks for your help
Great! What was your solution?