ArcGIS Pro Statistics on Selected Records

11162
44
Jump to solution
12-04-2018 03:10 PM
JoeBorgione
MVP Emeritus

Using ArcGIS Pro (2.2 in my case) how do you get statistics of a given field for just the selected records?  I have 4400 of 11,500 polygons selected.  I would like to see the mean of just one field: right clicking on the field name and selecting Statistics gives the statistics and distribution of ALL records....

Even summary statistics dosen't honor the selection; all I want to do is look at the mean value while making selections.  Seems pretty simple; gotta be missing something silly...

That should just about do it....
44 Replies
RTPL_AU
Occasional Contributor

@Michael_Kraus  "Make Layer from Selected Features" leads to unexpected behaviour in many scenarios. I'd strongly suggest relying more on definition queries, even if it means adding fields and modifying schema to suit. I know - it looks like such a handy feature. 

0 Kudos
Michael_Kraus
Occasional Contributor

Thanks - yes, but when you are trying to do a quick visual selection (not attribute based) and get quick summary statistics it would be great to get things working without having to create redundant copies of data by exporting selections to new feature classes. 

0 Kudos
RTPL_AU
Occasional Contributor

And you're using Make Layer from Selected Features to retain the selection and possibly saving it as part of the project?  I've moved to making everything I do attribute based unless it is something I do once only as a sanity check. Bitten too many times. The questions coming 6mths later always seem to be centered on the data that was not appropriately attributed 🙂
Definition queries remove the need for duplicated data.

My workflow: Get question to see how many parcels required to make up 60ha. Add field and call it "sel4ha".Do visual selection and calculate field with y. 
Copy layer in map. Add Def query to sel4ha = y.
Save project.

Client 6mths later  - we can now use 75ha. Open project. Visually select more features up to 15ha. Calc their fields to y. 
Layer using Def Query automatically shows all of the previous and new selection. Save Project. Wait 6mths.

Using the same feature class with definition queries also plays nicer with most geoprocessing tools - selections may or may not work reliably and a "Make Layer from Selected Features" layer is guaranteed to fail if the project is important.....

 

0 Kudos
Michael_Kraus
Occasional Contributor

This is now confirmed as a bug.  BUG-000137059: Unable to get the correct statistics based on the second selection in ArcGIS Pro.

KoryKramer
Esri Community Moderator

It looks like the bug referenced above is fixed in ArcGIS Pro 3.2 due out in a couple of weeks. 

Also, I wanted to note that we have heard the complaints that calculating statistics generates a chart for the layer, and you may not always (or ever?) need that. Data Engineering has been available for a number of releases to work with statistics and not generate a chart, but the entry point was not obvious for those of us who are used to right-clicking on the field header. 

Starting in ArcGIS Pro 3.2, try the new Explore Statistics option which will open the Data Engineering view for the field or fields selected and will display statistics for a selection or the entire field...

KoryKramer_0-1698069516034.png

We're hoping this makes quick, ad-hoc statistic workflows easier!