<?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 How to get a distinct count in Arcade dashboard indicator data expression? in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-get-a-distinct-count-in-arcade-dashboard/m-p/1265456#M7456</link>
    <description>&lt;P&gt;I have an Arcade data expression for an indicator widget in a dashboard. It returns a count of distinct sites in a feature layer in our Enterprise Portal. It works correctly in the expression editor, but in the layer selection section the expression has an error icon stating 'Unable to execute Arcade Script'. Any ideas why this won't work, and how to get it to work? Seems like it should be simple. Thanks!&lt;/P&gt;&lt;P&gt;I based this off of Josh's (&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;) answer in&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/td-p/1153506" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/td-p/1153506&lt;/A&gt;&lt;/P&gt;&lt;P&gt;var portal = Portal('&lt;A href="https://ourportal/" target="_blank"&gt;https://ourportal/&lt;/A&gt;');&lt;BR /&gt;var fs = FeatureSetByPortalItem(&lt;BR /&gt;portal,&lt;BR /&gt;"item_id",&lt;BR /&gt;0,&lt;BR /&gt;['site'],&lt;BR /&gt;false&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;return Count(Distinct(fs, 'site'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2023 14:42:54 GMT</pubDate>
    <dc:creator>ZenMasterZeke</dc:creator>
    <dc:date>2023-03-08T14:42:54Z</dc:date>
    <item>
      <title>How to get a distinct count in Arcade dashboard indicator data expression?</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-get-a-distinct-count-in-arcade-dashboard/m-p/1265456#M7456</link>
      <description>&lt;P&gt;I have an Arcade data expression for an indicator widget in a dashboard. It returns a count of distinct sites in a feature layer in our Enterprise Portal. It works correctly in the expression editor, but in the layer selection section the expression has an error icon stating 'Unable to execute Arcade Script'. Any ideas why this won't work, and how to get it to work? Seems like it should be simple. Thanks!&lt;/P&gt;&lt;P&gt;I based this off of Josh's (&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;) answer in&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/td-p/1153506" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/td-p/1153506&lt;/A&gt;&lt;/P&gt;&lt;P&gt;var portal = Portal('&lt;A href="https://ourportal/" target="_blank"&gt;https://ourportal/&lt;/A&gt;');&lt;BR /&gt;var fs = FeatureSetByPortalItem(&lt;BR /&gt;portal,&lt;BR /&gt;"item_id",&lt;BR /&gt;0,&lt;BR /&gt;['site'],&lt;BR /&gt;false&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;return Count(Distinct(fs, 'site'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 14:42:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-get-a-distinct-count-in-arcade-dashboard/m-p/1265456#M7456</guid>
      <dc:creator>ZenMasterZeke</dc:creator>
      <dc:date>2023-03-08T14:42:54Z</dc:date>
    </item>
  </channel>
</rss>

