AnsweredAssumed Answered

Second largest value from list

Question asked by davemiller17 on Feb 17, 2015
Latest reply on Apr 20, 2015 by jamesfreddyc

Hi folks,


I know how to use the inbuilt python function to derive the maximum value across a number of input fields.


What I am now trying to do is to derive the second largest value across a number of input fields, and to retain the name of the that field.


For example if I have a set of fields as below I'd like to return "Area 3" and 15 from this list...


Area 1 = 1

Area 2  = 5

Area 3 = 15

Area 4 = 16

Area 5 = 10


Any ideas? Is there some sort of combination of rank or sort I can use that will give me the answer?