<?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: Data Expression in Dashboards in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/data-expression-in-dashboards/m-p/1270856#M7521</link>
    <description>&lt;P&gt;Thank you - I knew it was something small.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2023 13:39:12 GMT</pubDate>
    <dc:creator>MarinGIS_Admin</dc:creator>
    <dc:date>2023-03-23T13:39:12Z</dc:date>
    <item>
      <title>Data Expression in Dashboards</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/data-expression-in-dashboards/m-p/1270706#M7516</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an expression I'm trying to solve when bringing&amp;nbsp; a service into a dashboard list.&lt;/P&gt;&lt;P&gt;I'd simply link to see values where 'CleanoutNeeded = Yes' and then I want to group them so I only have a single item in my resulting list for 'CleanoutNeeded'. My code returns an empty featureSet and no errors as displayed below. The &lt;A href="https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filter" target="_self"&gt;documentation&lt;/A&gt; indicates that a SQL expression with text can be used to satisfy the filter but it doesn't work here.&amp;nbsp; If I comment out the Filter() function, the GroupBy function returns both&amp;nbsp; 'Yes' and 'No' values in the cleanout needed field as expected.&lt;/P&gt;&lt;P&gt;var portal = Portal('hhts://&lt;A href="http://www.arcgis.com" target="_blank"&gt;www.arcgis.com&lt;/A&gt;');&lt;BR /&gt;var fs = FeatureSetByPortalItem(&lt;BR /&gt;portal,&lt;BR /&gt;'29fb497ebe1c47079a5f3f37013bfff9',&lt;BR /&gt;1,&lt;BR /&gt;[&lt;BR /&gt;'CleanoutNeeded'&lt;BR /&gt;],&lt;BR /&gt;False //don’t include geometry&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;var co = Filter(fs, 'CleanoutNeeded = Yes')&lt;BR /&gt;return co&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;return GroupBy(co, ['CleanoutNeeded'],&lt;BR /&gt;[{name: 'CleanoutNeeded', expression: 'CleanoutNeeded', statistic: 'Count'}])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea on how this can be achieved? Thanks in advance.&lt;/P&gt;&lt;P&gt;Zac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 03:04:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/data-expression-in-dashboards/m-p/1270706#M7516</guid>
      <dc:creator>ZacharyStanley</dc:creator>
      <dc:date>2023-03-23T03:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Data Expression in Dashboards</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/data-expression-in-dashboards/m-p/1270752#M7517</link>
      <description>&lt;P&gt;To post code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1677736512957.png" style="width: 546px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64138iBB0E7839D9513E0F/image-size/large?v=v2&amp;amp;px=999" role="button" title="JohannesLindner_0-1677736512957.png" alt="JohannesLindner_0-1677736512957.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1677736529803.png" style="width: 661px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64139i1EE5AE3E3AEE8247/image-size/large?v=v2&amp;amp;px=999" role="button" title="JohannesLindner_1-1677736529803.png" alt="JohannesLindner_1-1677736529803.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your SQL query is wring. CleanoutNeeded is a string field, so the query should look for a string (enclosed in single quotes).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var co = Filter(fs, "CleanoutNeeded = 'Yes'")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 23 Mar 2023 06:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/data-expression-in-dashboards/m-p/1270752#M7517</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-03-23T06:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Data Expression in Dashboards</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/data-expression-in-dashboards/m-p/1270836#M7519</link>
      <description>&lt;P&gt;Can you explain why you'd want a single-item list? What you're trying to do could easily be done with an Indicator widget using its off-the-shelf configuration, and would not require a Data Expression at all.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 13:08:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/data-expression-in-dashboards/m-p/1270836#M7519</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-03-23T13:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Data Expression in Dashboards</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/data-expression-in-dashboards/m-p/1270856#M7521</link>
      <description>&lt;P&gt;Thank you - I knew it was something small.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 13:39:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/data-expression-in-dashboards/m-p/1270856#M7521</guid>
      <dc:creator>MarinGIS_Admin</dc:creator>
      <dc:date>2023-03-23T13:39:12Z</dc:date>
    </item>
  </channel>
</rss>

