Model Builder and Summary Statistics - output 1 table

2149
2
03-15-2018 12:49 PM
LubicaCverckova2
New Contributor

I need to collect SUM of one field (Length) on five different feature classes. I set up an iterator in model builder which goes through all the feature classes to Summary Statistics. The problem is the output table only contains the SUM value of the last feature classes. I was hoping the table to have all five SUM values for each class. 

This is how my builder model looks like along with output table showing only one row:

Any ideas how to populate all five values?

Tags (1)
0 Kudos
2 Replies
curtvprice
MVP Esteemed Contributor

Uniquely name your outputs with the iteration # like this:

out_stats%n%

This will create output tables out_stats0, out_stats1, etc. as the model runs. You can then append these together to get your result.

If you want to batch this to do the append step automatically, you need to collect the results with a Collect Values tool and set as an output parameter, then embed your model in a new "master" model which takes the collected results as a parameter to the Merge tool. There are examples in the help of nesting models:

A quick tour of advanced techniques in ModelBuilder—Help | ArcGIS Desktop