Select to view content in your preferred language

Dynamic Expression: Percentage (Year over Year, growth rate)

155
1
09-01-2024 10:06 PM
GISOurData
New Contributor

Is it possible to populate a text box with a dynamic expression as a percentage?  

I have [Instance_Count] and [Previous_Year_Count].  I can use Arcare to calculate the Change [Incident_Change] as "$feature.Instance_Count - $feature.Previous_Year_Count"  However, I would like to show this change divided (/) by the [Previous_Year_Count].  It seems you are not able to write these long expressions.  Can you please advise how this can be accomplished.

 

GISOurData_0-1725253369674.png

 

0 Kudos
1 Reply
Marshal
Frequent Contributor

It would look something like below.  This would be configured to operate on the selection view of a specific layer, so that when a feature is selected it makes the calculation for that feature.  If multiple features are selected it is calculating based on the sum of all features.

((SUM({Instance_Count}) - SUM({Previous_Year_Count})) / SUM({Previous_Year_Count})) * 100 + "%"

 

0 Kudos