I'm trying to sum attributes based on if their ID matches the ID of other attributes in the feature class. To explain further, each road has it's own Replacement Cost and Section Number as well as a Super Section ID associated to it. A road can be a part of a Super Section with multiple other roads which will all share the same Super Section ID. What I want to do produce the total replacement cost of every Super Section for each road.

enter image description here

As you can see in the image above, the field Super_Section_Replacement_Cost has the replacement cost for the entire Supersection (the sum of the individual road replacement costs that are apart of the SS).

I was thinking an UpdateCursor might be useful but I'm not sure how I can group the attributes based on a specific field (the Super Section ID).

  • 2
    While an UpdateCursor could do this, it's certainly questionable whether it should; instead you can make a new table with Summary Statistics and join on SuperSectionID. I think you can even use dissolve with a sum on cost to generate the super section geometry. – Vince May 3 '19 at 15:06
  • Yep creating a Summary Statistics table and joining on the SS ID worked, thank you! – Reed May 3 '19 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.