Math operations with Indicator widget values

188
1
07-20-2021 08:14 AM
Labels (2)
PerfilSuporte
New Contributor

Hi!

Is it possible to do math operations using values displayed in Indicator widgets?

I've thought about trying to do it using data expressions but I don't even know how to start, because all examples I've found so far only showed how to handle data from feature layers, not widgets. 

I've set the Indicators to retrieve data from a table which every record represents the sales from each month for each polygon.

PerfilSuporte_0-1626792910236.png

The user should select the months to be compared at the side panel and select a polygon at the map to filter the data. 

What I want to do is just simple math operations like display the difference between the two time spans.

 

PerfilSuporte_1-1626793487296.png

 

Thx!

Tags (2)
0 Kudos
1 Reply
jcarlson
MVP Notable Contributor

While this is certainly possible with a Data Expression, this is simple enough that you can also use a Reference Value. In your "After - Before" indicator, configure it so that the value and the reference are the same:

jcarlson_0-1627395636190.png

Then in the actual text portion of the indicator, one of the predefined values you can enter is the difference.

jcarlson_1-1627395702896.png

 

Then on your list widgets that you're using to filter the indicators, you can set the filter actions to apply to the value or the reference. I'm using a chart instead of a list, but the idea is the same:

jcarlson_2-1627396006828.png

 

- Josh Carlson
Kendall County GIS
0 Kudos