<?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: Sum ARCADE with condition in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/sum-arcade-with-condition/m-p/1274446#M51210</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hello to both of you &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The solution was ultimately &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var filter = Filter($layer, 'FREQ_MAINTENANCE &amp;lt;&amp;gt; 0'); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var Sum = Sum(filter, 'Shape__Length'); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;return Sum; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the Filter function, the condition must be in SQL. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Again thanks to you &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bye&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 02 Apr 2023 19:43:47 GMT</pubDate>
    <dc:creator>AurelienJOSSET</dc:creator>
    <dc:date>2023-04-02T19:43:47Z</dc:date>
    <item>
      <title>Sum ARCADE with condition</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sum-arcade-with-condition/m-p/1274410#M51205</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Good morning, I'm looking to make a rather simple ARCADE formula: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the sum of the Shape__Length field with a filter on one field (frequency different from 0 in my case)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is where i am now&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var Sum =Sum($layer, "Shape__Length") &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var filter = Filter(Sum, $feature.FREQ_ENTRETIEN !=0) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;return filter &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks a lot for your help &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Aurelian&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 22:22:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sum-arcade-with-condition/m-p/1274410#M51205</guid>
      <dc:creator>AurelienJOSSET</dc:creator>
      <dc:date>2023-04-01T22:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sum ARCADE with condition</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sum-arcade-with-condition/m-p/1274411#M51206</link>
      <description>&lt;P&gt;Hi Aurelian,&lt;/P&gt;&lt;P&gt;I think it'd work if you just flipped the first two lines, filtering the $feature.FREQ_ENTRETIEN !=0 values out before you sum them. Just make sure to then put the filter variable into the sum function instead of $layer.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Josh&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2023 22:34:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sum-arcade-with-condition/m-p/1274411#M51206</guid>
      <dc:creator>JoshuaSharp-Heward</dc:creator>
      <dc:date>2023-04-01T22:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sum ARCADE with condition</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sum-arcade-with-condition/m-p/1274424#M51208</link>
      <description>&lt;P&gt;Hi Aurelien,&lt;/P&gt;&lt;P&gt;The expression you have created is almost correct but needs a small correction to filter the layer before summing the Shape__Length field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;var filter = Filter($layer, $feature.FREQ_ENTRETIEN != 0);&lt;/P&gt;&lt;P&gt;var Sum = Sum(filter, "Shape__Length");&lt;/P&gt;&lt;P&gt;return Sum;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Omar&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 08:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sum-arcade-with-condition/m-p/1274424#M51208</guid>
      <dc:creator>Omar_A</dc:creator>
      <dc:date>2023-04-02T08:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sum ARCADE with condition</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sum-arcade-with-condition/m-p/1274446#M51210</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello to both of you &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your help. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The solution was ultimately &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var filter = Filter($layer, 'FREQ_MAINTENANCE &amp;lt;&amp;gt; 0'); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var Sum = Sum(filter, 'Shape__Length'); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;return Sum; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the Filter function, the condition must be in SQL. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Again thanks to you &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bye&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 19:43:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sum-arcade-with-condition/m-p/1274446#M51210</guid>
      <dc:creator>AurelienJOSSET</dc:creator>
      <dc:date>2023-04-02T19:43:47Z</dc:date>
    </item>
  </channel>
</rss>

