I have a shapefile with a "Random Number" Column. I'd like to use ModelBuilder to Select and export the lowest N values. I've seen this post about selecting the top 10 records which is pretty similar.
Selecting limited TOP n from specific column in ArcGIS query builder?
But the problem I'm having is this post uses a Query Builder, but I'm not sure how to adapt this for model builder into the 'Select tool'. I'm using ArcGIS desktop
1 Answer 1
Run the data through the SORT tool, sorting by your random number field, sorting in an ascending sequence, send the output into IN_MEMORY.
For example input data is:
The sort tool creates an FID field which is sequential, so all you need to so is select rows where FID <= 10 as shown below:
If you need the lowest 20 then select FID <= 20. This can all be easily included into a model.
Explore related questions
See similar questions with these tags.