<?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: Calculating Cumulative Field Values in ArcMap using a case field in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/1494621#M27318</link>
    <description>&lt;P&gt;I don't know Python and I'm trying to follow what you did here.&amp;nbsp; I have fields "Well ID", "Date", and "Injection".&amp;nbsp; I want to calculate a cumulative sum of Injection values over time for each unique Well ID.&amp;nbsp; Where would I substitute those field names into your code example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2024 20:23:36 GMT</pubDate>
    <dc:creator>JohnBrand</dc:creator>
    <dc:date>2024-06-18T20:23:36Z</dc:date>
    <item>
      <title>Calculating Cumulative Field Values in ArcMap using a case field</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/518770#M17214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to calculate cumulative field values using&amp;nbsp;an case field from another column in ArcGIS 10.4.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if I have an "ID" column and "Count" column inside my attribute table, I want to calculate cumulative values for each year separately.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used this:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://support.esri.com/en/technical-article/000014432" title="https://support.esri.com/en/technical-article/000014432"&gt;How to: Calculate cumulative shape length values of a feature class using the Field Calculator&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do that if I select all rows with the same ID and run the field calculator, but that is a lot of manual work, so I want to use "ID" field as case field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best way to do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 May 2020 12:42:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/518770#M17214</guid>
      <dc:creator>SlobodanKomatina2</dc:creator>
      <dc:date>2020-05-09T12:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Cumulative Field Values in ArcMap using a case field</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/518771#M17215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;count &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
id_list &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;cummulativeCount&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;increment&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; id_row_value&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;global&lt;/SPAN&gt; count
    &lt;SPAN class="keyword token"&gt;global&lt;/SPAN&gt; id_list

   
    id_list&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id_row_value&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id_list&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; id_row_value &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; id_list&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; 
        count &lt;SPAN class="operator token"&gt;+=&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;increment&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        

    &lt;SPAN class="keyword token"&gt;elif&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;id_list&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        count &lt;SPAN class="operator token"&gt;+=&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;increment&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        

    &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        count &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;increment&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        

    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; count&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cummulativeCount( !count_! , !id! )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:38:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/518771#M17215</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-12-11T22:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Cumulative Field Values in ArcMap using a case field</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/518772#M17216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 May 2020 15:26:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/518772#M17216</guid>
      <dc:creator>SlobodanKomatina2</dc:creator>
      <dc:date>2020-05-09T15:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Cumulative Field Values in ArcMap using a case field</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/518773#M17217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;нема на чему&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 May 2020 15:35:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/518773#M17217</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-05-09T15:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Cumulative Field Values in ArcMap using a case field</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/1494621#M27318</link>
      <description>&lt;P&gt;I don't know Python and I'm trying to follow what you did here.&amp;nbsp; I have fields "Well ID", "Date", and "Injection".&amp;nbsp; I want to calculate a cumulative sum of Injection values over time for each unique Well ID.&amp;nbsp; Where would I substitute those field names into your code example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 20:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/calculating-cumulative-field-values-in-arcmap/m-p/1494621#M27318</guid>
      <dc:creator>JohnBrand</dc:creator>
      <dc:date>2024-06-18T20:23:36Z</dc:date>
    </item>
  </channel>
</rss>

