Calculate Values using Dynamic Text

6359
11
02-17-2020 05:41 PM
FPCWAGIS_Admin
Occasional Contributor

Hi brains trust. I'm hoping someone can guide me here. Is it possible to use Dynamic Text in ArcGIS Pro to return the SUM of values in an attribute table (got this bit down pat) and then calculate/format a display value. 

For example, I run the SUM function on the Shape_Area field and it returns metres squared but I want to display it as Hectares. In labeling scripts this would be done like this using VB script:  formatnumber(Shape_Area\10000, 1). 

Another calculation I'd like to do is take the SUM and multiple by 0.5 or 0.3 to get a percentage of the SUM. 

An extension to this is, can separate values in dynamic text be added together to get a total (i.e. SUM A, plus SUM B = Total)?

0 Kudos
11 Replies
LindsayRaabe_FPCWA
Honored Contributor

Quite possibly that would work for us. We have similar workflows in a number of map templates anyway that do require a definition query, so All Rows would work the same as Visible Rows. 

Lindsay Raabe
GIS Officer
Forest Products Commission WA
0 Kudos
by Anonymous User
Not applicable

Your suggestion to tap into the dynamic text Text View and add calculations worked perfectly for one of my problems! Wondering if it is possible to produce the sum of multiple values using either SQL or the Text View and display it in my map layout. I would like to calculate the total drive length of a series of route that I have created. In order to  do this, I need to query all of the roads in each route and then multiply the road lengths by the number of lanes present. (i.e. select roads with 2 lanes and multiply by 2, select roads with 3 lanes and multiply by 3 then produce a grand total of the length of road driven for each route)

0 Kudos