Good afternoon,
I am looking for a way to count in a layer how many records have two fields distinct, and show the result in a text box.
Thanks
Hi @SanchezNuñez ,
The text widget supports Arcade expressions in the June 2025 AGOL release.
You can use a script like this in your expression:
var ds = $dataSources["dataSource_id"].layer; var distinctItem = Distinct(ds, 'CNTRY_NAME'); return Count(distinctItem);
Regards,
Shengdi
This is what I need if I use a SQL Statement:
SELECT distinct[ProjectNumber],[ProjectPage]FROM ProjecTablesAnd the count will be
SELECT COUNT(*)FROM (SELECT distinct[ProjectNumber],[ProjectPage]FROM ProjecTables) as dt
Please advise
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.