I have two point layers. One contains nest locations and the ID of the individual using that nest. The second point layer contains movement points for all individuals in the area.
I would like my ModelBuilder model to generate a table with a row for each nest showing the MAX and AVERAGE distance from the nest to the movement point which are from the individual ID using the nest.
The images below are a mockup of the basic idea of what the input looks like and what I'd like the results to contain.
So far, and with some help on this board, I've used Point Distance to output a table which has the distance from each nest point to all other points. Then I've been playing with Summary Statistics to try to generate the output table. The problem is that the Point Distance tool, I believe, is creating distance from the nest to ALL points and not just the ones that match the ID. I need to put a filter into the SurveyPoints at the beginning to iterate through the nest IDs. But ideally I want this all to wrap into a single final table.
My untried idea is to try to do a iterate through SurveyPoints using a filter based on the nest id (I don't know how to do this). Then somehow append the results of the Point Distance or the Summary Statistics to get a final table.
---UPDATE--- I tried the approach as suggested which looked like it was going to work. However, I'm getting a weird snag. Let me know if this should be a new question.
My Iterate Field Values is setup just like the suggestion with the Iterator using the nests UnitID field which is a string.
When I run the model (after validating) it gives me an error because the Value = 1 for some reason. Actually if I click on the Value circle before I run the model the greyed-out value in the Value box is '1'. None of the UnitID fields are 1.
So when I run the model I get the error below. "Nests_meter" is the true name of the "Nests" labelled circle in my model.
ERROR 000358: Invalid expression UnitID = 1 An invalid SQL statement was used. An invalid SQL statement was used. [Nests_meter] Failed to execute (Make Feature Layer).
The weird thing is that the first time I added the iterator, it did contain a valid value. But after that it just starts with a value of 1. I recreated the model from scratch but still get the '1'.