<?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: Summarize table in arcade for Popup in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033469#M38812</link>
    <description>&lt;PRE&gt;var planStat = FeatureSetByName($map,"Planning_Layers - Development Applications", ['PRStatus', 'Units', 'SingleD'], false)&lt;/PRE&gt;</description>
    <pubDate>Fri, 05 Mar 2021 17:01:42 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-03-05T17:01:42Z</dc:date>
    <item>
      <title>Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033397#M38805</link>
      <description>&lt;P&gt;Hello Again folks,&lt;/P&gt;&lt;P&gt;I feel I may be exhausting&amp;nbsp; my question limit - much appreciation to the community - I am looking into a course.&lt;/P&gt;&lt;P&gt;I'm trying to summarize a field in arcade and get statistics from the&amp;nbsp; other fields for a result similar to this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aroininen_0-1614958119661.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7632i494FCBBFCCD79C25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aroininen_0-1614958119661.png" alt="aroininen_0-1614958119661.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is this possible in Arcade?&lt;/P&gt;&lt;P&gt;I have looked a Paul Bakers post and the Spanish one and many others but I just can't seem to make anything work&lt;/P&gt;&lt;P&gt;I think Groupby is the option but I just don't know get the sums from the other fields&lt;/P&gt;&lt;P&gt;also do I need to use intersect as I want to get results from the whole dataset if so I can intersect with the municipal border as all developments are within&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got this far with this expression (excuse the radon variables!):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aroininen_1-1614958519344.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7633i5A7486ABAA88B8DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aroininen_1-1614958519344.png" alt="aroininen_1-1614958519344.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;var intersectArea = Intersects(FeatureSetByName($map,"Planning_Layers - Development Applications"), $feature)&lt;BR /&gt;var treeList = groupBy(intersectArea, "PRStatus",&lt;BR /&gt;{name:"count", expression:"PRStatus" , statistic:"COUNT"})&lt;/P&gt;&lt;P&gt;var topFeatures = Top(OrderBy(treeList, "count desc"),10)&lt;/P&gt;&lt;P&gt;var treeList = ''&lt;BR /&gt;for (var topFeature in topFeatures) {&lt;BR /&gt;&lt;BR /&gt;treeList += topFeature.PRStatus + " (" + topFeature.count + ")" + TextFormatting.NewLine&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;return treeList&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 15:39:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033397#M38805</guid>
      <dc:creator>aroininen</dc:creator>
      <dc:date>2021-03-05T15:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033403#M38806</link>
      <description>&lt;P&gt;You're right, &lt;STRONG&gt;GroupBy&lt;/STRONG&gt; is what you want. Since you're just grouping by a single field, and performing basic sums, it's not too complex.&lt;/P&gt;&lt;P&gt;Personally, I find it's easier to create the statistics parameter separately, for the sake of keeping everything straight.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;var stats_list = [
    { name: 'Count_PRStatus', expression: 1, statistic: 'COUNT' },
    { name: 'Sum_Units', expression: 'Units', statistic: 'SUM' },
    { name: 'Sum_SingleD', expression: 'SingleD', statistic: 'SUM' },
    ...
]

GroupBy(intersectArea, "PRStatus", stats_list)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you're looking to just return statistics from the entire dataset, there's not really a need to intersect. That being the case, you might adjust your &lt;STRONG&gt;FeatureSetByName&lt;/STRONG&gt; function as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;FeatureSetByName($map,"Planning_Layers - Development Applications", ['field1', 'field2', etc], false)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Including a field list tells the script to grab only the fields you need, and setting the &lt;EM&gt;includeGeometry&lt;/EM&gt; parameter to &lt;EM&gt;false&lt;/EM&gt; will improve your script performance a lot by not loading the feature geometry and just working with the attributes separately.&lt;/P&gt;&lt;P&gt;Then just use &lt;STRONG&gt;GroupBy&lt;/STRONG&gt; with the featureset directly.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 16:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033403#M38806</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-05T16:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033438#M38808</link>
      <description>&lt;P&gt;WOW thanks!!!!&lt;/P&gt;&lt;P&gt;close!!&lt;/P&gt;&lt;P&gt;(FeatureSetByName($map,"Planning_Layers - Development Applications", ['PRStatus', 'Units', 'SingleD'], false)&lt;/P&gt;&lt;P&gt;var stats_list = [&lt;BR /&gt;{ name: 'Count_PRStatus', expression: 1, statistic: 'COUNT' },&lt;BR /&gt;{ name: 'Sum_Units', expression: 'Units', statistic: 'SUM' },&lt;/P&gt;&lt;P&gt;{ name: 'Sum_SingleD', expression: 'SingleD', statistic: 'SUM' },&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;GroupBy("PRStatus", stats_list)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Return Stats_list&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what&amp;nbsp; did I miss?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aroininen_0-1614961529675.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7654i9F4A9E351C8F280A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aroininen_0-1614961529675.png" alt="aroininen_0-1614961529675.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 16:26:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033438#M38808</guid>
      <dc:creator>aroininen</dc:creator>
      <dc:date>2021-03-05T16:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033454#M38809</link>
      <description>&lt;P&gt;It should be&lt;STRONG&gt; FeatureSetByName(...)&lt;/STRONG&gt;, so try taking the parenthesis off of the front. That was a typo in my earlier response.&lt;/P&gt;&lt;P&gt;Also, you'll still need to bring the FeatureSet into the &lt;STRONG&gt;GroupBy&lt;/STRONG&gt; function, so assign the featureset to its own variable, then give that variable as the first parameter of &lt;STRONG&gt;GroupBy&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 16:39:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033454#M38809</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-05T16:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033468#M38811</link>
      <description>&lt;P&gt;my apologies&lt;/P&gt;&lt;P&gt;what am I not doing...?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var planStat = (FeatureSetByName)($map,"Planning_Layers - Development Applications", ['PRStatus', 'Units', 'SingleD'], false)&lt;/P&gt;&lt;P&gt;var stats_list = [&lt;BR /&gt;{ name: 'Count_PRStatus', expression: 1, statistic: 'COUNT' },&lt;BR /&gt;{ name: 'Sum_Units', expression: 'Units', statistic: 'SUM' },&lt;/P&gt;&lt;P&gt;{ name: 'Sum_SingleD', expression: 'SingleD', statistic: 'SUM' },&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;GroupBy(planStat,"PRStatus", stats_list)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get this&lt;/P&gt;&lt;P&gt;&lt;SPAN class="text-red"&gt;Execution Error:&lt;/SPAN&gt;&lt;SPAN&gt;h.charAt is not a function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 17:00:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033468#M38811</guid>
      <dc:creator>aroininen</dc:creator>
      <dc:date>2021-03-05T17:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033469#M38812</link>
      <description>&lt;PRE&gt;var planStat = FeatureSetByName($map,"Planning_Layers - Development Applications", ['PRStatus', 'Units', 'SingleD'], false)&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Mar 2021 17:01:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033469#M38812</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-05T17:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033502#M38813</link>
      <description>&lt;P&gt;keep getting error&lt;/P&gt;&lt;P&gt;&lt;SPAN class="text-red"&gt;Execution Error:&lt;/SPAN&gt;&lt;SPAN&gt;Illegal Value: GroupBy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is the layer in the map that I am using the expression on: Planning_Layers - Development Applications - Master&lt;/P&gt;&lt;P&gt;should this be something different like the map name...?&lt;/P&gt;&lt;P&gt;var planStat = FeatureSetByName($map,"Planning_Layers - Development Applications - Master", ['PRStatus', 'Units', 'SingleD'], false)&lt;/P&gt;&lt;P&gt;var stats_list = [&lt;BR /&gt;{ name: 'Count_PRStatus', expression: 1, statistic: 'COUNT' },&lt;BR /&gt;{ name: 'Sum_Units', expression: 'Units', statistic: 'SUM' },&lt;/P&gt;&lt;P&gt;{ name: 'Sum_SingleD', expression: 'SingleD', statistic: 'SUM' },&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;GroupBy(planStat,"PRStatus", stats_list)&lt;BR /&gt;Return stats_list&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 17:59:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033502#M38813</guid>
      <dc:creator>aroininen</dc:creator>
      <dc:date>2021-03-05T17:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033580#M38815</link>
      <description>&lt;P&gt;I was able to adjust my original expression to no use intersect though!&lt;/P&gt;&lt;P&gt;the one that just returns PLSatus Counts&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 20:05:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033580#M38815</guid>
      <dc:creator>aroininen</dc:creator>
      <dc:date>2021-03-05T20:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033615#M38818</link>
      <description>&lt;P&gt;Make sure that your &lt;STRONG&gt;return&lt;/STRONG&gt; is giving you the GroupBy, not the stats_list.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;return GroupBy(...)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 21:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033615#M38818</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-05T21:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033716#M38819</link>
      <description>&lt;P&gt;Thanks for all your help Josh but I cannot work out this syntax for the return... I will keep trying..&lt;/P&gt;&lt;P&gt;var planStat = FeatureSetByName($map,"Planning_Layers - Development Applications - Master", ['PRStatus', 'Units', 'SingleD'], false)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var stats_list = [&lt;BR /&gt;{ name: 'Count_PRStatus', expression: 1, statistic: 'COUNT' },&lt;BR /&gt;{ name: 'Sum_Units', expression: 'Units', statistic: 'SUM' },&lt;/P&gt;&lt;P&gt;{ name: 'Sum_SingleD', expression: 'SingleD', statistic: 'SUM' },&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Return GroupBy(planStat,"PRStatus", stats_list);&lt;/P&gt;&lt;P&gt;error&amp;nbsp;&lt;SPAN class="text-red"&gt;Execution Error:&lt;/SPAN&gt;&lt;SPAN&gt;Illegal Value: GroupBy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or this way -&amp;nbsp;Return; GroupBy(planStat,"PRStatus", stats_list);&lt;/P&gt;&lt;P&gt;gives me this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aroininen_0-1615046844939.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7752i64A3B326AF48671A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="aroininen_0-1615046844939.png" alt="aroininen_0-1615046844939.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again Aaron&lt;/P&gt;</description>
      <pubDate>Sat, 06 Mar 2021 16:07:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1033716#M38819</guid>
      <dc:creator>aroininen</dc:creator>
      <dc:date>2021-03-06T16:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1034482#M38859</link>
      <description>&lt;P&gt;Hello Again,&lt;/P&gt;&lt;P&gt;I had a bit of a break though I am able to display total units by Status with this expression!:&lt;/P&gt;&lt;P&gt;Problem is if I keep adding more fields for statistics (i.e Semi, Row)&amp;nbsp; the result is always the last Groupby&lt;/P&gt;&lt;P&gt;I tried editing the&amp;nbsp; last statement to add more stats to result but I get nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the expression I am using:&lt;/P&gt;&lt;P&gt;I don't need to order this but if I remove it doesn't work that why I just use top 10&lt;/P&gt;&lt;P&gt;var planstat = FeatureSetByName($map,"Planning_Layers - Development Applications - master", ['PRStatus', 'Units', 'SingleD'], false)&lt;BR /&gt;var treeList = groupBy(planstat, "PRStatus",&lt;BR /&gt;{name:"count", expression:"PRStatus" , statistic:"COUNT"})&lt;BR /&gt;var treeList = groupBy(planstat, "PRStatus",&lt;BR /&gt;{name:"count", expression:"Units" , statistic:"SUM"})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var topFeatures = Top(OrderBy(treeList, "count desc"),10)&lt;/P&gt;&lt;P&gt;var treeList = ''&lt;BR /&gt;for (var topFeature in topFeatures) {&lt;BR /&gt;&lt;BR /&gt;treeList += topFeature.PRStatus +" (" + topFeature.COUNT + ")"+ TextFormatting.NewLine&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;return treeList&lt;/P&gt;&lt;P&gt;If I get this last bit figured out that would be great but I can live with what I have too&lt;/P&gt;&lt;P&gt;Thanks again community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 15:28:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1034482#M38859</guid>
      <dc:creator>aroininen</dc:creator>
      <dc:date>2021-03-09T15:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223558#M48413</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;&amp;nbsp;I have a similar question on OrderBy.&amp;nbsp; It is showing the total as the first element but with no label.&amp;nbsp; Then it also does null with no label.&amp;nbsp; Would be nice if it said Null of course.&amp;nbsp; But what i want is to not show the total. The help says nothing about a total.&amp;nbsp; So I figure pop the first element but there is no pop function and Erase will only take array not FeatureSet.&amp;nbsp; Also Array cannot convert a FeatureSet.&lt;/P&gt;&lt;P&gt;I just want to remove the first one without having to check manually.&amp;nbsp; I see Top in there but that wont work.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DougBrowning_0-1666210020326.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/53998i972EB3A3930512F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DougBrowning_0-1666210020326.png" alt="DougBrowning_0-1666210020326.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var plots = Intersects($feature,FeatureSetByName($map,"TerrestrialIndicators", ["RH_BioticIntegrity"], false));
var groupOut = OrderBy(GroupBy(plots, ['RH_BioticIntegrity'], [ { name: 'outputStatName', expression: 'RH_BioticIntegrity', statistic: 'COUNT' } ]),'RH_BioticIntegrity')
var display = ''

for (var grp in groupOut) {
    display = display + grp.RH_BioticIntegrity + " - " + grp.outputStatName + TextFormatting.NewLine 
}
return display&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 21:05:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223558#M48413</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-10-19T21:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223793#M48438</link>
      <description>&lt;P&gt;Odd. It shouldn't be including a total if you haven't somehow asked for one...&lt;/P&gt;&lt;P&gt;I'd recommend using your FeatureSet to create an Array, then subset the array to remove the first item and use Concatenate to build a newline-separated string. I wish there were an easy way to get an Array from a FeatureSet.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var out_arr = []

for (var grp in groupOut){
    Push(
        out_arr,
        `${grp.RH_BioticIntegrity} - ${grp.outputStatName}`
    )
}

return Concatenate(
    Slice(out_arr, 1),
    '\n'
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 14:03:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223793#M48438</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-10-20T14:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223829#M48446</link>
      <description>&lt;P&gt;Funny I just posted that "&lt;SPAN&gt;I wish there were an easy way to get an Array from a FeatureSet."&amp;nbsp; Did you see that one?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But yea I see nothing in the doc that says Order by returns a Total but there it is.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks I will look at it.&amp;nbsp; For now I just left it in.&amp;nbsp; Wait just noted that must not be the total.&amp;nbsp; I dont know what it is number of records??&amp;nbsp; These are all 16.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DougBrowning_1-1666278032774.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/54045iC91969B2155A6F6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DougBrowning_1-1666278032774.png" alt="DougBrowning_1-1666278032774.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What the heck is that first number with no label?&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>Thu, 20 Oct 2022 15:01:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223829#M48446</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-10-20T15:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223837#M48448</link>
      <description>&lt;P&gt;I missed that! Y'know, I thought I had a good handle on Arcade before all this... But then, I couldn't explain anything about how cars work either, even though I know how to drive one.&lt;/P&gt;&lt;P&gt;I'd check the tables of the input layers to make sure you don't have any null records hiding out. Or try throwing some Console functions in to check intermediate outputs.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 15:10:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223837#M48448</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-10-20T15:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223847#M48450</link>
      <description>&lt;P&gt;If you look close the second blank number is the Nulls.&amp;nbsp; I have no idea what the 16 is now.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DougBrowning_0-1666279088153.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/54047i6AB7DFFE7D9EA11A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DougBrowning_0-1666279088153.png" alt="DougBrowning_0-1666279088153.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 15:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223847#M48450</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-10-20T15:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize table in arcade for Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223899#M48453</link>
      <description>&lt;P&gt;I got this working now and added code for Nulls thanks.&amp;nbsp; Still no idea what the heck the first number is.&amp;nbsp; Not in the help that I see.&amp;nbsp; Weird 16 makes no sense.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var plots = Intersects($feature,FeatureSetByName($map,"TerrestrialIndicators", ["RH_HydrologicFunction"], false));
var groupOut = OrderBy(GroupBy(plots, ['RH_HydrologicFunction'], [ { name: 'outputStatName', expression: 'RH_HydrologicFunction', statistic: 'COUNT' } ]),'RH_HydrologicFunction')
var out_arr = []

for (var grp in groupOut){
    if (IsEmpty(grp.RH_HydrologicFunction)) {
         Push(out_arr," Nulls-" + grp.outputStatName)
    }
    else{
    Push(out_arr,grp.RH_HydrologicFunction + "-" + grp.outputStatName)
    }
}

return Concatenate(
    Slice(out_arr, 1),
    ', '
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DougBrowning_0-1666284867370.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/54059i14AF4553B9479CEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DougBrowning_0-1666284867370.png" alt="DougBrowning_0-1666284867370.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 16:54:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/summarize-table-in-arcade-for-popup/m-p/1223899#M48453</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-10-20T16:54:37Z</dc:date>
    </item>
  </channel>
</rss>

