<?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 Display sum of lengths by diameter using arcade in dashboards in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/display-sum-of-lengths-by-diameter-using-arcade-in/m-p/1599232#M64161</link>
    <description>&lt;P&gt;Hello, I am new to arcade and have been having some trouble with creating a table. This is my first post, as well, so if I’m missing something or going about this the wrong way, let me know. I have line features that contain fields for diameter and length. I want to create a table that sums up the length by diameter. For example, the total length of pipes with a 4 inch diameter is 2,000 ft. I’d like to write code that creates a table with all of the diameters on the left and the sum of the pipe lengths for that diameter on the right.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I haven’t been able to find similar cases like this online and I feel like I’ve just hit a wall. I tried a script that an AI suggested, but have just been getting vague syntax errors when attempting. Does the code that it suggests make sense?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Mar 2025 23:12:49 GMT</pubDate>
    <dc:creator>LivDurica</dc:creator>
    <dc:date>2025-03-25T23:12:49Z</dc:date>
    <item>
      <title>Display sum of lengths by diameter using arcade in dashboards</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/display-sum-of-lengths-by-diameter-using-arcade-in/m-p/1599232#M64161</link>
      <description>&lt;P&gt;Hello, I am new to arcade and have been having some trouble with creating a table. This is my first post, as well, so if I’m missing something or going about this the wrong way, let me know. I have line features that contain fields for diameter and length. I want to create a table that sums up the length by diameter. For example, the total length of pipes with a 4 inch diameter is 2,000 ft. I’d like to write code that creates a table with all of the diameters on the left and the sum of the pipe lengths for that diameter on the right.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I haven’t been able to find similar cases like this online and I feel like I’ve just hit a wall. I tried a script that an AI suggested, but have just been getting vague syntax errors when attempting. Does the code that it suggests make sense?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 23:12:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/display-sum-of-lengths-by-diameter-using-arcade-in/m-p/1599232#M64161</guid>
      <dc:creator>LivDurica</dc:creator>
      <dc:date>2025-03-25T23:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Display sum of lengths by diameter using arcade in dashboards</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/display-sum-of-lengths-by-diameter-using-arcade-in/m-p/1599392#M64164</link>
      <description>&lt;P&gt;When asking a question about code, please the &lt;A href="https://community.esri.com/t5/community-help-documents/how-to-insert-code-in-your-post/ta-p/914552" target="_self"&gt;code editor&lt;/A&gt; instead of a image of the code.&lt;/P&gt;&lt;P&gt;You can use the &lt;A href="https://developers.arcgis.com/arcade/function-reference/featureset_functions/#groupby" target="_self"&gt;GroupBy&lt;/A&gt; function to do this type of summary. You code would look something like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByPortalItem(Portal("your portal"), "itemId", 0, ["PipeDiameterField", "PipeLengthField"], false);

GroupBy(fs, ["PipeDiameterField"], { name: "Length", expression: "PipeLengthField", statistic: "SUM" })&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 12:51:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/display-sum-of-lengths-by-diameter-using-arcade-in/m-p/1599392#M64164</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-03-26T12:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Display sum of lengths by diameter using arcade in dashboards</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/display-sum-of-lengths-by-diameter-using-arcade-in/m-p/1600604#M64191</link>
      <description>&lt;P&gt;That function is built into the Table elements in ArcGIS Online dashboards without any code.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RhettZufelt_0-1743198076765.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/128965i969AF72DF18A5493/image-size/large?v=v2&amp;amp;px=999" role="button" title="RhettZufelt_0-1743198076765.png" alt="RhettZufelt_0-1743198076765.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Just select the Grouped values, set the field you want to group by as the Category field, choose "Sum" and the value/sort fields.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 21:44:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/display-sum-of-lengths-by-diameter-using-arcade-in/m-p/1600604#M64191</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2025-03-28T21:44:05Z</dc:date>
    </item>
  </channel>
</rss>

