<?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 GroupBy null Date and not null Date pie chart in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/groupby-null-date-and-not-null-date-pie-chart/m-p/1266658#M7473</link>
    <description>&lt;P&gt;I'm not great with Arcade and stumped.&amp;nbsp; I'm trying to create a pie chart in a Dashboard based on two date fields, 'Ordered' and 'Received'.&amp;nbsp; Records are either null or populated with the date ordered or received.&amp;nbsp; I'd like the pie chart to show counts of Ordered and Received.&amp;nbsp; I think I need to use the GroupBy function, but I'm not sure what I'm doing.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var p = &amp;lt;portal&amp;gt;;
var tracts = FeatureSetByPortalItem(Portal(p),&amp;lt;item&amp;gt;,
    &amp;lt;id&amp;gt;,
    [
        'OBJECTID',
        'Name',
        ‘Ordered',
        'Received',
    ],
    false
);
var count = GroupBy(tracts,
  [  // fields/expressions to group statistics by
    { name: ‘Ordered', expression: 'Received IS NOT NULL'},
    { name: ‘Received', expression: 'Received IS NULL'}
  ],
  [
      {name: 'Ordered', expression: '1', statistic: 'COUNT'}
]);
return(count)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Mar 2023 20:11:17 GMT</pubDate>
    <dc:creator>JustinWolff</dc:creator>
    <dc:date>2023-03-10T20:11:17Z</dc:date>
    <item>
      <title>GroupBy null Date and not null Date pie chart</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/groupby-null-date-and-not-null-date-pie-chart/m-p/1266658#M7473</link>
      <description>&lt;P&gt;I'm not great with Arcade and stumped.&amp;nbsp; I'm trying to create a pie chart in a Dashboard based on two date fields, 'Ordered' and 'Received'.&amp;nbsp; Records are either null or populated with the date ordered or received.&amp;nbsp; I'd like the pie chart to show counts of Ordered and Received.&amp;nbsp; I think I need to use the GroupBy function, but I'm not sure what I'm doing.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var p = &amp;lt;portal&amp;gt;;
var tracts = FeatureSetByPortalItem(Portal(p),&amp;lt;item&amp;gt;,
    &amp;lt;id&amp;gt;,
    [
        'OBJECTID',
        'Name',
        ‘Ordered',
        'Received',
    ],
    false
);
var count = GroupBy(tracts,
  [  // fields/expressions to group statistics by
    { name: ‘Ordered', expression: 'Received IS NOT NULL'},
    { name: ‘Received', expression: 'Received IS NULL'}
  ],
  [
      {name: 'Ordered', expression: '1', statistic: 'COUNT'}
]);
return(count)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 20:11:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/groupby-null-date-and-not-null-date-pie-chart/m-p/1266658#M7473</guid>
      <dc:creator>JustinWolff</dc:creator>
      <dc:date>2023-03-10T20:11:17Z</dc:date>
    </item>
  </channel>
</rss>

