AnsweredAssumed Answered

Is there a way to get the maximum value of a column in Field Calculator?

Question asked by Frank50 on Apr 20, 2016
Latest reply on Apr 22, 2016 by Dan_Patterson

I want to have a function in my model that converts an arbitrary value to a percentage within that column's range. It would need to be dynamic. Right now I have:


def prob( Failure_Score ):

   my_list = arcpy.da.TableToNumPyArray ("Failure_Score")

   my_max = max(my_list)

   percentage = (Failure_Score / my_max)*100

   return percentage


but it returns nothing. Really any advice would be greatly appreciated.

Attached is a screencap with the two fields in question and the Calculate Field window.