Create Sum of Fields from Multiple Layers

228
2
a month ago
Labels (1)
TSmoothC
New Contributor

Hello,

I'm trying to figure out how to create a new layer that reflects the sum of one field from each of the underlying layers. 

For example, consider three overlapping circular polygons (each circular polygon is a different layer with the an identically names field VALUE). The first circular polygon has a VALUE of 1, the second circular polygon has a VALUE of 2, and the third circular polygon has a VALUE of 3. 

I'm trying to create a new layer that sums the VALUE field from the underlying circular polygons and brings those values to the surface (please see attached image for what I want this new layer to look like. 

What tool can I use to accomplish this task? I'm sorry if this is a simple question... Thank you for your time!

 

 Venn Diagram.png

0 Kudos
2 Replies
Robert_LeClair
Esri Notable Contributor

I'm thinking a Spatial Join (Analysis) GP tool with a SUM Field Map parameter will do the job here!

0 Kudos
Dale_Honeycutt
Occasional Contributor II

Use the Union tool with your three layers as input.  Using your example of 3 simple layers, the output of Union will be 7 polygons which is what you need to sum your attributes. 

 

To demonstrate, I made three feature classes, Circle1, Circle2, and Circle3 that look like your example.  Each of these feature classes has a field Stuff (integer) which I used to label the 3 layers shown below.

Dale_Honeycutt_1-1713393293788.png

 

 Below is the attribute table that is the result of Union (I called the output Venn).  The FID_Circle1 column is the OBJECTID of the Circle1 layer, FID_Circle2 is the OBJECTID of the Circle2 layer, and so forth.

 

The attribute table of Venn has 3 fields named 'Stuff'  that is actually the alias name of the field... if you open the Fields View found while viewing the attribute table, you'll see that their actual field name is Stuff, Stuff1, and Stuff12.  It's just Pro's way of uniquely identifying duplicate field names.

Dale_Honeycutt_0-1713393018995.png

Here's the Field View of Venn

Dale_Honeycutt_4-1713394165545.png

I added the SumOfStuff field using the Add Field tool, then used the Calculate Field tool with this expression:

Dale_Honeycutt_2-1713393639398.png

I just clicked the 3 different 'Stuff' fields in the list and it populates the expression with the real field name..(Kinda confusing, right?)

Here's the result, labeled by SumOfStuff

Dale_Honeycutt_3-1713393748634.png

 

 

0 Kudos