0

I'm new to ModelBuilder. I have created a script in python that gives results for each month, using ModelBuilder how can I make a sum between each field of each month of the year to have a single feature class with the totals. Here is a figure explains what I am looking for. enter image description here

MrXsquared
36.2k22 gold badges76 silver badges127 bronze badges
asked Dec 18, 2021 at 13:44
5
  • Does the tables have geometries? Are they the same? Or do you just want a table output? Commented Dec 18, 2021 at 18:26
  • 1
    Placing "or ArcPy" in the title makes this two questions. Since you don't actually mention ArcPy in the body, it would be better to remove the title text and tag. Commented Dec 18, 2021 at 21:02
  • thank you for your comment BERA, Vince, yes, the tables have their geometries, they are the polygons of the buildings in a district. i have calculated their energy needs for each month, and i want to do the total for the whole year through Modelbuilder or through an Arcpy script. but i don't know how to proceed. Commented Dec 18, 2021 at 22:28
  • the fields of the table of the 12 feature class are the same. Commented Dec 18, 2021 at 23:22
  • Please make sure that any text you include on pictures to try and explain your question also appears as formatted text within your question body. That way it's available to searches and easily read on all devices. Commented Dec 19, 2021 at 7:00

1 Answer 1

3

If I have understood what you want, you could do this:

  1. In each table add a new field and populate it with the year, so each row in the table is the year. I see that as functionality written into your existing script.
  2. Merge all the tables into a single table
  3. Run summary statistics tool summing the fields but grouping by the year. This will generate your sums in a new table
answered Dec 18, 2021 at 17:42
2
  • thank you Hornbydd for your feedback ! I have tested your proposal, the tables have their geometries sorry I didn't mention it, they are the polygons of the buildings of a district. when I merge them, I get for each building 12 duplicate polygons for the 12 Months. but what I'm looking for is a single polygon of the building with the total of 12 months. Commented Dec 18, 2021 at 23:15
  • Does each polygon have a building ID that is the same in each table, so for example the same building is always X. If so simply add another group by field in the summary statistics tool. Commented Dec 19, 2021 at 2:03

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.