Calculating Maximum Value In a Field

Discussion created by mvance4 on Nov 1, 2011
Latest reply on Nov 1, 2011 by nahmed-esristaff
I need to calculate the maximum value in a field in order to be used to derive a percentage.  I've used a script that adds all the values together, but it populates the field for the total with increments of each addition.  I need it to populate all the rows in the field with the total.  Any advice is appreciated.  Here is the code I've been using:

total = 0
def accumulate(increment):
global total
if total:
  total += increment
  total = increment
return total

Expression = accumulate(!Shape_Area!)

Attached is an image of the result of that.