<?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: Field calculator is taking long time for multiplication of two fields in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/field-calculator-is-taking-long-time-for/m-p/1114003#M43632</link>
    <description>&lt;LI-CODE lang="python"&gt;from arcpy.da import TableToNumPyArray
tbl = r"C:\arcpro_npg\npg\Project_npg\npgeom.gdb\xxxx"
flds = ["A", "B"]
arr = TableToNumPyArray(tbl, flds, where_clause=None, skip_nulls=True, null_value=None)
numerator = arr["A"] * arr["B"]
denom = np.sum(arr["B"])
final = np.sum(numerator) / denom
final
49.648290039245&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 04 Nov 2021 12:13:00 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-11-04T12:13:00Z</dc:date>
    <item>
      <title>Field calculator is taking long time for multiplication of two fields</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-is-taking-long-time-for/m-p/1113980#M43630</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me to increase the speed of the field calculator in ArcGIS Pro? I've about 4000000 features. I want to calculate the aggregate average. For that, I've to perform multiplication first and do the summation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the multiplication of two fields is taking more than 24 hours on my computer. My computer is i7 11 generation with ram 32GB.&lt;/P&gt;&lt;P&gt;Can anyone please suggest how to make this process faster or suggest any other way to calculate aggregate average faster?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt; The formula for average will be like, where W and D are two fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scadawatch_analytical_function_wma_formula.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/26805iE2664703F829F856/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scadawatch_analytical_function_wma_formula.png" alt="scadawatch_analytical_function_wma_formula.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 09:41:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-is-taking-long-time-for/m-p/1113980#M43630</guid>
      <dc:creator>saidurgamalleswarthota</dc:creator>
      <dc:date>2021-11-04T09:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Field calculator is taking long time for multiplication of two fields</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-is-taking-long-time-for/m-p/1113981#M43631</link>
      <description>&lt;P&gt;I would can the session and reboot and try again.&amp;nbsp; Nothing should take that long for multiplication.&lt;/P&gt;&lt;P&gt;If you want speed, work outside the field calculator&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/tabletonumpyarray.htm" target="_blank"&gt;TableToNumPyArray—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;do the multiplication and summation in NumPy if you are python adept&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 09:45:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-is-taking-long-time-for/m-p/1113981#M43631</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-11-04T09:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field calculator is taking long time for multiplication of two fields</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-is-taking-long-time-for/m-p/1114003#M43632</link>
      <description>&lt;LI-CODE lang="python"&gt;from arcpy.da import TableToNumPyArray
tbl = r"C:\arcpro_npg\npg\Project_npg\npgeom.gdb\xxxx"
flds = ["A", "B"]
arr = TableToNumPyArray(tbl, flds, where_clause=None, skip_nulls=True, null_value=None)
numerator = arr["A"] * arr["B"]
denom = np.sum(arr["B"])
final = np.sum(numerator) / denom
final
49.648290039245&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 04 Nov 2021 12:13:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-is-taking-long-time-for/m-p/1114003#M43632</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-11-04T12:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Field calculator is taking long time for multiplication of two fields</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculator-is-taking-long-time-for/m-p/1114392#M43635</link>
      <description>&lt;P&gt;Thank you for your help. I think I found my mistake. The last time when I did the multiplication the newly created field type was selected as text. Now I chose the type as double and the field calculator is working just fine. all the calculations were under 3-4 minutes. Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 04:40:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculator-is-taking-long-time-for/m-p/1114392#M43635</guid>
      <dc:creator>saidurgamalleswarthota</dc:creator>
      <dc:date>2021-11-05T04:40:25Z</dc:date>
    </item>
  </channel>
</rss>

