Is it possible to summarize field values with dynamic text in a layout?

373
1
03-18-2021 09:07 AM
Labels (1)
Marie-JoëlleDesgagné
New Contributor III

Hi!

Here is what i'm trying to do:

I have a layout showing different types of plants. What I would like to do is to make a summarize so we know how many plants we need to buy from each kind. So far, I only have been able to show a list of the attributes with a table frame:

Marie-JoëlleDesgagné_0-1616083161355.png

What I would like to se is something like this:

Marie-JoëlleDesgagné_1-1616083472614.png

So there is 3 main categories and many of subtypes. I would like to see how many type of each is showing on the map. 

Thank you !!

 

0 Kudos
1 Reply
TomBole
Esri Regular Contributor

Hi Marie-Joëlle, 

Have you looked at Table Dynamic Text?  You should be able to use the Custom query option to define the category and subset for each text item.

You can access a number of table statistics from the Dynamic Text gallery.

Screenshot 2020-11-19 053457.png

Once you've clicked the statistic that you want you will get a dialog where you can choose the query type.

Screenshot1.png

Choosing Custom query will give you a button "New expression". 

Screenshot2.png

Click "New expression" and you should see the expression builder. Use this to build your expression. 

Screenshot3.png

Using Custom query will a set a "static" query and will not adjust a result based on what features are in the map view - that is, "summarize the visible features in my map for these subgroups within this category".  In order to have a custom query and a spatial query active on the text element you would need to write some code using ArcPy.mp (python).  Here are some samples you find interesting. The Thematic Map Series sample may provide some helpful - even though you may not be interested in a map series, the sample may provide ideas on how to use ArcPy.mp to set temporary queries on layers.

Hope this helps, 

Tom

0 Kudos