Access the number of selected points in a indicator using Arcade

01-24-2022 11:36 PM
Labels (1)
New Contributor

Is there any way, using Arcade, to access the number of selected points of a map in an indicator of a Dashboard?

I would like to find the accumulated value of a field of each point and to show it in an indicator as the mean of all the selected points, i.e. I want to calculate first the sum of each point, and then the mean of all the sums.

If I could access the number of selected points, it would be very easy: (sum)/(nº of points).

If there is not a way to access this value, is there any other way to do what I am trying to do usinc Arcade?

Thank you so much.

0 Kudos
1 Reply
Esri Esteemed Contributor

Hi @martav , 


As mentioned in this thread ( Arcade has no access to the selected features in a map. 

When you have a selection in the map you can define an action that filters the features used for in indicator. However, this only works when the indicator is using the same feature source. In case the selection should propagate to a different featureset, you can only do this by matching field values.

So for me, the main question is, if it is necessary to use an Arcade expression for the indicator or the indicator can point to the same source? From what I understand from your description you have multiple fields you need to sum per feature which is used later on to determine the average for the selected features. Summing values will require Arcade, but using Arcade will result in a different FeatureSet and that might complicate filtering the result of the indicator by the selected features.