<?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: Expression to count total from multiple layers in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1129251#M5579</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;, one more question, from the two layers, I want to get a shared field as a long list. For example, I want to have a list of all object IDs from both layers. any idea to edit the expression?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Dec 2021 20:06:29 GMT</pubDate>
    <dc:creator>SayedWali</dc:creator>
    <dc:date>2021-12-28T20:06:29Z</dc:date>
    <item>
      <title>Expression to count total from multiple layers</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1127958#M5520</link>
      <description>&lt;P&gt;I want to create an indicator to count items from multiple layers. Is there any arcade expression example or any reference? Any idea will be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 10:19:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1127958#M5520</guid>
      <dc:creator>SayedWali</dc:creator>
      <dc:date>2021-12-21T10:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to count total from multiple layers</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1127998#M5524</link>
      <description>&lt;P&gt;There are a number of examples on ESRI's Arcade expressions GitHub repo. Here's one that counts items from multiple layers for a chart:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcade-expressions/blob/master/dashboard_data/CombineMultipleLayers(SerialChart).md" target="_blank"&gt;https://github.com/Esri/arcade-expressions/blob/master/dashboard_data/CombineMultipleLayers(SerialChart).md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you haven't used a Data Expression before, they can look a lot more complicated than they really are. The linked example should apply just as easily to an Indicator widget.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 14:18:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1127998#M5524</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-12-21T14:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to count total from multiple layers</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1129138#M5570</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/216231"&gt;@SayedWali&lt;/a&gt;-&amp;nbsp; Just to recap and post the solution here, rather than in a private message:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var portal = Portal('https://npaid.maps.arcgis.com');

var FAR = FeatureSetByPortalItem(
    portal,
    '56db417ebbc541bcbb6ccf9c49524cc9',
    0,
    ['*'],
    false
)

var PDIA = FeatureSetByPortalItem(
    portal,
    '56db417ebbc541bcbb6ccf9c49524cc9',
    0,
    ['*'],
    false
)

var total_count = Count(FAR) + Count(PDIA)

var outDict = {
    fields: [{ name: 'total', type: 'esriFieldTypeInteger'}],
    geometryType: '',
    features: [{attributes: {total: total_count}}],
};


// Return dictionary cast as a feature set
return FeatureSet(Text(outDict));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 13:54:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1129138#M5570</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-12-28T13:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to count total from multiple layers</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1129237#M5574</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;, Thank you very much!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 19:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1129237#M5574</guid>
      <dc:creator>SayedWali</dc:creator>
      <dc:date>2021-12-28T19:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Expression to count total from multiple layers</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1129251#M5579</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;, one more question, from the two layers, I want to get a shared field as a long list. For example, I want to have a list of all object IDs from both layers. any idea to edit the expression?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 20:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/expression-to-count-total-from-multiple-layers/m-p/1129251#M5579</guid>
      <dc:creator>SayedWali</dc:creator>
      <dc:date>2021-12-28T20:06:29Z</dc:date>
    </item>
  </channel>
</rss>

