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
This is what I need if I use a SQL Statement:
SELECT distinct
[ProjectNumber]
,[ProjectPage]
FROM ProjecTables
And the count will be
SELECT COUNT(*)
FROM (
SELECT distinct
[ProjectNumber]
,[ProjectPage]
FROM ProjecTables
) as dt
Please advise
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