Select to view content in your preferred language

Add a distinct count function to the Text widget to ExB

834
2
01-31-2023 08:53 AM
Status: Open
Labels (2)
ChipMorgan65
Frequent Contributor

There's a useful feature to the Indicator widget in Dashboard that I'd really like to see replicated in the Text widget in ExB. It allows you to do a distinct count of a text field. 

I envision a new function being added to the Text widget in ExB called dcount, or something like that. It would be used for text attributes where you want to count the number of different/distinct values of that field and not simply the number of rows in the feature layer. 

The screenshot below shows this feature in action on a dashboard. Note the distinct switch at the bottom center. In this situation, there are 2,950 distinct plant species in several hundred thousand plant observations in the feature layer (I have a companion indicator that shows the observation count, which I can do in ExB).

ChipMorgan65_0-1675183496604.png

 

2 Comments
Hels77
by

This is from 2023. What is everyone doing as a work around?

D_Atkins

@Hels77 

I think I've got one!

Experience Builder can utilize a Column Chart to establish Categories from a Field.  Then, you can use the "Output" of the chart in the Dynamic Content of the Text Widget: 'Count' based on the 'field' will yield your count of Distinct/Unique values.  (Let me know if I can provide some more detail.)

Note that this is not nearly as robust a solution as we'd like, i.e.:
Unique values in a List widget - Esri Community