How to symbolize polygons using graduated colors based on the sum of values in one field, where the values in other fields match. Using ArcGIS Pro and Arcade Expressions.

317
2
01-29-2020 07:50 AM
HaydenHinton
New Contributor II

I have a very specific symbology need that has me stumped I am using Arcpro and need a fitting arcade expression.

I have a polygon feature class that has only two basic fields that need to be considered, Person and Count, with a person having one or more counts. Here is an example table

Person | Count

Tim         4

Tim         2

Kat         3

Kat         1

I want to symbolize the four polygons based on a color gradient using the sum of each persons' counts. In other words, I want all of these polygons to be colored based on the sum of his counts (4+2=6) and Kat's polygons based on her counts (3+1=4). So both of Tim's polygons are the same 'cold' color since his sum is lower and Kats are both the same 'hot' color since her sum is higher.

Here's the catch: I do not want to edit this table by adding/calculating any fields, or use a new feature class to symbolize. I know I could dissolve on Person and sum the count fields in a new feature class to symbolize, but I want to use this feature class.

I want to be able to change persons around (e.g. give change one of Kat's polygons to Tim) and that symbology will automatically update based on Tim and Kat's new count sums.

So since I can't edit this table, or create a new one, it looks like my only option to work this out is in the symbology options. I think creating a custom expression for the graduated colors symbology option is the way to go. This requires using Arcade, and I just cannot seem to find an arcade expression that fits this need.

0 Kudos
2 Replies
XanderBakker
Esri Esteemed Contributor

Hi Hayden Hinton ,

I'm afraid that you are not able to do a sum of multiple feature in the symbology profile. You need a calculation to do this. If you cannot change or update the layer, than Arcade will not provide an option for you in this case.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Hayden Hinton ,

In case you could do a field calculation, you would probably need something like this:

return Sum(Filter($layer, "Person = '" + $feature.Person + "'"), "Count");
0 Kudos