<?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: Create Nested Group By Arcade in a List in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1497715#M9869</link>
    <description>&lt;P&gt;I think I found a possible explanation of my issue.&amp;nbsp; The results in my first group by should return 13,000 results but it is only returning 2,000.&amp;nbsp; So when I apply the second group by, I think it puts it in a never ending looping because it can't pull the data correctly.&amp;nbsp; I found the below thread that describes a similar experience.&amp;nbsp; Upon testing, if I don't apply a group by function to my data I get all records OR if apply a group by function to my data that results in less than 2000 records than it correctly works.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-arcade-featureset-expression/td-p/1081932" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-arcade-featureset-expression/td-p/1081932&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If I change&amp;nbsp;the&amp;nbsp;&lt;SPAN&gt;Maximum Number of Records Returned by Server on the service in Server manager to higher than my results (14,000) then my coding works.&amp;nbsp; However, I know increasing that number that high is going to dramatically impact my performance of the service so I will not be going that route.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2024 17:00:58 GMT</pubDate>
    <dc:creator>LindseyStone</dc:creator>
    <dc:date>2024-06-26T17:00:58Z</dc:date>
    <item>
      <title>Create Nested Group By Arcade in a List</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1496833#M9852</link>
      <description>&lt;P&gt;I'm trying to create a special arcade function in a Dashboard List (Enterprise 10.9.1) that finds the unique between two fields and then counts the number of one field.&amp;nbsp; The below screenshot is a example of data.&amp;nbsp; I have entries with multiple subnetworks.&amp;nbsp; Within the subnetworks there is accounts, the accounts can be duplicated across the same subnetwork and across other subnetworks.&amp;nbsp; I want to find only where the subnetwork + account are unique (this way the accounts that run across multiple subnetworks can be counted in each).&amp;nbsp; Then once I find the unique I want a count of each account&amp;nbsp; within each Subnetwork.&amp;nbsp; Below is utilizing the GroupBy function that I get the first GroupBy to work, but the second GroupBy returns a blank table.&amp;nbsp; I also tried the Distinct function and I get similar results and the Distinct tends to crash the entire Dashboard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var portal = Portal(portal url);
var secondary = FeatureSetByPortalItem(portal,'1bb7df369ca44c8880d65011fa3d69e6',40,['*'],false)
var service = Filter(secondary, 'lifecyclestatus = 8');
var sub = GroupBy(service,
   [
       {name: 'Subnet', expression: 'SUBNETWORKNAME'},
       {name: 'acct', expression: 'account'}
    ],
    [
      { name: 'SubAccountCount', expression: '1', statistic: 'COUNT' },
    ]
);
var gsub = GroupBy(sub,
    ['Subnet'],
    [
      { name: 'Subnetwork Count', expression: '1', statistic: 'COUNT' },
    ]
);

return gsub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LindseyStone_1-1719255913996.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107811iA06DA9079A4D30CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LindseyStone_1-1719255913996.png" alt="LindseyStone_1-1719255913996.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 19:29:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1496833#M9852</guid>
      <dc:creator>LindseyStone</dc:creator>
      <dc:date>2024-06-24T19:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create Nested Group By Arcade in a List</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1496855#M9853</link>
      <description>&lt;P&gt;It seems like it ought to work, based on how you've written it. Try opening your browser's Developer Tools and watch the &lt;STRONG&gt;network&lt;/STRONG&gt; tab when you run the expression. What request is it sending to your server? Is it truly returning an empty set, or is it just a long-running expression? I've written some really awful Arcade in the past that took over 5 minutes to actually return something.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 20:28:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1496855#M9853</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-06-24T20:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create Nested Group By Arcade in a List</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1496867#M9854</link>
      <description>&lt;P&gt;Yes, if I run your logic on my dataset, it does return the expected nested group&lt;/P&gt;&lt;P&gt;This is the result of the first GroupBy&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snag_1d74f65.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107824iCC938CE5A574B738/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snag_1d74f65.png" alt="Snag_1d74f65.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is the result of the second GroupBy&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snag_1d79874.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107825i81B13F687AA872B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snag_1d79874.png" alt="Snag_1d79874.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 21:03:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1496867#M9854</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-06-24T21:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create Nested Group By Arcade in a List</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1496878#M9855</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you screenshot what you have under line 46.&amp;nbsp; The second GroupBy does not declare that a variable so what are returning?&amp;nbsp; Also, the first group by (GB) from your initial feature service and not the filtered one.&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp; This is what I get when I test mine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LindseyStone_0-1719266175186.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107827iADF719B4B2192F45/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LindseyStone_0-1719266175186.png" alt="LindseyStone_0-1719266175186.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 21:56:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1496878#M9855</guid>
      <dc:creator>LindseyStone</dc:creator>
      <dc:date>2024-06-24T21:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create Nested Group By Arcade in a List</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1497082#M9857</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;when watching the network log of the browser tools when I run the first group by, I get the results in a matter of a second and the log shows&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LindseyStone_0-1719321192474.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107861iB98521F7A70EA4FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LindseyStone_0-1719321192474.png" alt="LindseyStone_0-1719321192474.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when I run the it with the second Group By the blank result window pops up immediately as I have screenshot above, but the log just repeats pulls the same query over and over and over again.&amp;nbsp; I let it sit for 5 minutes and it just continues.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LindseyStone_1-1719321316007.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/107862i7719592052736E6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LindseyStone_1-1719321316007.png" alt="LindseyStone_1-1719321316007.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 13:16:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1497082#M9857</guid>
      <dc:creator>LindseyStone</dc:creator>
      <dc:date>2024-06-25T13:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create Nested Group By Arcade in a List</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1497084#M9858</link>
      <description>&lt;P&gt;It's an &lt;A href="https://developers.arcgis.com/arcade/guide/return/#implicit-returns" target="_self"&gt;implicit return&lt;/A&gt;, so line 46 was the last line of code&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 13:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1497084#M9858</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-06-25T13:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create Nested Group By Arcade in a List</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1497715#M9869</link>
      <description>&lt;P&gt;I think I found a possible explanation of my issue.&amp;nbsp; The results in my first group by should return 13,000 results but it is only returning 2,000.&amp;nbsp; So when I apply the second group by, I think it puts it in a never ending looping because it can't pull the data correctly.&amp;nbsp; I found the below thread that describes a similar experience.&amp;nbsp; Upon testing, if I don't apply a group by function to my data I get all records OR if apply a group by function to my data that results in less than 2000 records than it correctly works.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-arcade-featureset-expression/td-p/1081932" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-arcade-featureset-expression/td-p/1081932&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If I change&amp;nbsp;the&amp;nbsp;&lt;SPAN&gt;Maximum Number of Records Returned by Server on the service in Server manager to higher than my results (14,000) then my coding works.&amp;nbsp; However, I know increasing that number that high is going to dramatically impact my performance of the service so I will not be going that route.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 17:00:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/create-nested-group-by-arcade-in-a-list/m-p/1497715#M9869</guid>
      <dc:creator>LindseyStone</dc:creator>
      <dc:date>2024-06-26T17:00:58Z</dc:date>
    </item>
  </channel>
</rss>

