Select to view content in your preferred language

How can I configure an indicator widget in ArcGIS Online Dashboard to sum the total count of features from three different point layers

186
1
03-06-2025 03:04 PM
MaríaCamilaAyalaCastillo1
New Contributor

How can I configure an indicator widget in ArcGIS Online Dashboard to sum the total count of features from three different point layers? I want to add an indicator widget in an ArcGIS Online Dashboard that displays the sum of the total count of features from three different point layers. Each layer is independent, but all are point feature layers. The indicator should dynamically sum the count of features from the three layers and display the result in a single widget. The total should automatically update if the number of features changes in any of the layers. Ideally, I would like to display a custom label like "Total Points". If possible, I would prefer to configure this using Arcade expressions or any native dashboard tools.

0 Kudos
1 Reply
KenBuja
MVP Esteemed Contributor

Here's one way to combine the counts of multiple datasets into a single indicator

var fs1 = FeatureSetByPortalItem(
  Portal("yourPortal"),
  "item1",
  0
);

var fs2 = FeatureSetByPortalItem(
  Portal("yourPortal"),
  "item2",
  0
);

var Dict = {
  fields: [{ name: "Total", type: "esriFieldTypeInteger" }],
  geometryType: "",
  features: [{ attributes: { Total: Count(fs1) + Count(fs2) } }]
};
return FeatureSet(Dict);
0 Kudos