Select to view content in your preferred language

Select multiple features and sum the selected features area AGOL

54
1
16 hours ago
Labels (2)
brandonmann3
New Contributor II

I am hoping there is some solution in a dashboard or an experience builder where an individual can select multiple features with select by rectangle or Ctrl click multiple polygons and a widget would display the sum of the Area fields. Its only one feature class they would be selecting from.

Thank you!

0 Kudos
1 Reply
RickeyFight
MVP Regular Contributor

@brandonmann3 

for Dashboards try this:

  • Add a Serial Chart or Indicator Widget:

    • Add a Serial Chart or Indicator element to display the sum of the area fields.
  • Configure the Serial Chart/Indicator:

    • For a Serial Chart:
      • Configure the data source to be the feature layer.
      • Set the category field (if needed) and the value field to the area field.
      • Use the "Sum" aggregation to display the total area.
    • For an Indicator:
      • Configure the data source to be the feature layer.
      • Set the "Value" to the sum of the area field using an Arcade expression.
  • Add Actions to the Map:

    • Configure an action for the map to filter the Serial Chart or Indicator based on the selection.
    • Go to the map settings, click on "Actions," and set up an action that triggers when features are selected. This action should filter the data in your Serial Chart or Indicator widget.

For experience builder try this :

  • Add a Feature Info Widget:

    • Add a Feature Info widget or a custom widget to display the sum of the area fields.
  • Set Up Data Source and Expressions:

    • Configure the data source for the Feature Info widget to use your feature layer.
    • Use an Arcade expression to calculate the sum of the area fields for the selected features.
      javascript
      var selectedFeatures = FeatureSetByPortalItem(Portal('YOUR_PORTAL_URL'), 'YOUR_FEATURE_LAYER_ID', 0, ['areaField']); var sumArea = 0; for (var feature in selectedFeatures) { sumArea += feature.areaField; } return sumArea;
  • Configure Interactivity:

    • Set up an interaction trigger for the Map widget to trigger the calculation when features are selected.
    • Configure the Feature Info widget to display the result of the Arcade expression.

 

 

 

0 Kudos