Select to view content in your preferred language

ArcGIS Pro Statistics on Selected Records

14438
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
by Anonymous User
Not applicable

Is there a help page on this topic? I've used the create layer from selection function in pro to create a subset of my roads feature class (plow route 1) and would like to calculate the total length that the plows travel based on the number of lanes and the length field. I've only played with the data engineering button for about 5mins but the sum field does not seem to update with each new selection.

Alternatively, I would love to use dynamic text in my map layout to perform this calculation for me rather than having to do it manually every year.

0 Kudos
StephenJackson1
Occasional Contributor
When you've actively selected the route and you're in the Data Engineering section, make sure you select your Length field and then hit the sum button. Along the length field you can verify however many objects you had selected, and you should receive a resultant length based on the sum of the items selected. In Pro, you have to remember to hit that sum button each time, the program will not automatically calculate the sum (at least that I've found). I hope this helps you...?


0 Kudos
by Anonymous User
Not applicable

Thanks. I think the problem was that I wasn't clicking the calculate button after each new selection.

Is there a way to query/filter the statistics without exporting it to a database table? I would like to display the total length for each plow zone. i.e. in my overview map layout can I insert a table that shows the length of each separate route?

0 Kudos
StephenJackson1
Occasional Contributor

I worked a similar project in ArcGIS Pro, creating a map of my county's Road Maintenance Districts.  On my county map, I inserted an excel table that displayed the breakdown of road surface types (by road district) and length of miles of each road surface type.  I obtained this data from actively selecting those roads, using the Data Engineering tool to sum the lengths, and I then transferred that data to a (separate) excel file.  I then copied/pasted the Excel data directly onto my map.  ArcGIS Pro may have an easier way of transferring that (length sum data) to excel, but if so, I haven't found it.  I've attached a copy of the (master) map I created so you can see how I displayed that information.

0 Kudos
by Anonymous User
Not applicable

I found a way to add it to my layout by including SQL queries in my dynamic text box. The zones/routes change from year to year so this option is way more straight forward in my opinion - no need to manually copy & paste the values from the Data Engineering pane. This option works well for this example but I was working on a project the other day that has some layers that were created using the create layer from selected features option and unfortunately dynamic text wasn't behaving as expected in that case.

SHartholt_0-1669230521420.png

 

StephenJackson1
Occasional Contributor

Very nice!  SQL is my next language to learn...so I've not scratched the surface (yet) of what can be done with this program.  Thank you for sharing your success with SQL queries, I like the fact that it's dynamic text.

0 Kudos
FrancisHourigan1
Frequent Contributor

Has anyone else noticed that in ArcGIS Pro 3.x this selection option is no longer there? It disappears as soon as I make a selection.

0 Kudos
PeteJordan
Frequent Contributor

They have changed how this works yet again.  Seems every update they move things around or change the way things behave and this is just another one that has changed.  I made an ArcGIS Pro document for myself to guide me thought it all and I'm always having to revise it and rewrite things.  It's kind of annoying...

StephenJackson1
Occasional Contributor

   With regard to the original discussion/post, if your issue involves trying to obtain a calculated (sum) value from an active selection of records... I did a side-by-side comparison of ArcMap and ArcGIS Pro 3.0, to learn the differences and mouse-clicks needed to accomplish the task in both.  In both programs, with the attribute table open and an active group of records selected (to calculate a sum), ArcGIS Pro requires one extra step that ArcMap did not.  In Pro 3.0, with records actively selected:

 - (from the ribbon) select "Data" tab.

- (from the ribbon) select "Data Engineering".

- (in the pop-up window) select the "Add all Fields and Calculate" button OR select the "Calculate" tab, depending on how the window populates in your particular circumstance.

- (in the pop-up window) scroll to the value/field you wish to calculate, to view the results.  I will typically look first at the "Count" column to make sure it's a correct reflection of the active selection of records I'm trying to calculate.  If the count is correct, then I view the calculated result. 

- If you're repetitively selecting groups of records to calculate a result, you may have to select the "Calculate" tab each time (to refresh the data in the Data Engineering feature).  I'll mention again, this is why I check the "Count" column first, to ensure it's a correct reflection of the records I want to calculate.

For my use, I am typically calculating the lengths (miles) of various types of road surfaces within my county's various road districts.  This was easy to do within ArcMap and very frustrating to do within ArcGIS Pro until I learned how to use the Data Engineering function.  Now it's easy in both programs, though it does add one extra step in Pro (annoying). I hope this information is helpful.

 

   

Michael_Kraus
Regular Contributor

There also seems to be a bug (I am using ArcGIS Pro 3.1) where if you create a layer using "Make Layer from Selected Features" the stats don't show for a further selection on this selection layer.  

Michael_Kraus_0-1678844092639.png