Hello all,
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.
But the multiplication of two fields is taking more than 24 hours on my computer. My computer is i7 11 generation with ram 32GB.
Can anyone please suggest how to make this process faster or suggest any other way to calculate aggregate average faster?
Thank you so much.
The formula for average will be like, where W and D are two fields.
Solved! Go to Solution.
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.
I would can the session and reboot and try again. Nothing should take that long for multiplication.
If you want speed, work outside the field calculator
TableToNumPyArray—ArcGIS Pro | Documentation
do the multiplication and summation in NumPy if you are python adept
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
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.