<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Count records where two fields have distinct values in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/count-records-where-two-fields-have-distinct/m-p/1627692#M19571</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/467729"&gt;@SanchezNuñez&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The text widget supports Arcade expressions in the June 2025 AGOL release.&lt;/P&gt;&lt;P&gt;You can use a script like this in your expression:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var ds = $dataSources["dataSource_id"].layer;
var distinctItem = Distinct(ds, 'CNTRY_NAME');

return Count(distinctItem);&lt;/LI-CODE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shengdi&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jun 2025 09:40:22 GMT</pubDate>
    <dc:creator>ShengdiZhang</dc:creator>
    <dc:date>2025-06-27T09:40:22Z</dc:date>
    <item>
      <title>Count records where two fields have distinct values</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/count-records-where-two-fields-have-distinct/m-p/1528058#M14552</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;I am looking for a way to&amp;nbsp; count in a layer how many records have two fields distinct, and show&amp;nbsp; the result in a text box.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 17:55:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/count-records-where-two-fields-have-distinct/m-p/1528058#M14552</guid>
      <dc:creator>SanchezNuñez</dc:creator>
      <dc:date>2024-08-27T17:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count records where two fields have distinct values</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/count-records-where-two-fields-have-distinct/m-p/1528563#M14579</link>
      <description>&lt;P&gt;This is what I need if I use a SQL Statement:&lt;/P&gt;&lt;P&gt;SELECT distinct&lt;BR /&gt;[ProjectNumber]&lt;BR /&gt;,[ProjectPage]&lt;BR /&gt;FROM ProjecTables&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And the count will be&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SELECT COUNT(*)&lt;BR /&gt;FROM (&lt;BR /&gt;SELECT distinct&lt;BR /&gt;[ProjectNumber]&lt;BR /&gt;,[ProjectPage]&lt;BR /&gt;FROM ProjecTables&lt;BR /&gt;) as dt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 11:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/count-records-where-two-fields-have-distinct/m-p/1528563#M14579</guid>
      <dc:creator>SanchezNuñez</dc:creator>
      <dc:date>2024-08-28T11:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count records where two fields have distinct values</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/count-records-where-two-fields-have-distinct/m-p/1627692#M19571</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/467729"&gt;@SanchezNuñez&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The text widget supports Arcade expressions in the June 2025 AGOL release.&lt;/P&gt;&lt;P&gt;You can use a script like this in your expression:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var ds = $dataSources["dataSource_id"].layer;
var distinctItem = Distinct(ds, 'CNTRY_NAME');

return Count(distinctItem);&lt;/LI-CODE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shengdi&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2025 09:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/count-records-where-two-fields-have-distinct/m-p/1627692#M19571</guid>
      <dc:creator>ShengdiZhang</dc:creator>
      <dc:date>2025-06-27T09:40:22Z</dc:date>
    </item>
  </channel>
</rss>

