How to script the summation of all values of a specific attribute across all features within a layer

kbellis
kbellis Global Mapper UserTrusted User

For example, on one layer is a group of 3 counties, each with the attribute Est_1_Jul_2021 and their respective population values. I'd like to create a new attribute, GroupPop with the sum of all features in the layer.

It's been several years since I wrote any GM scripts and I'm pretty rusty. Thank you very much for any help!

Kind regards,

Kelly