3 Replies Latest reply: Jan 6, 2016 11:53 PM by Disha Ahuja RSS

    Fetching field values for given set of conditions

    Disha Ahuja

      Hi All,

       

      I have a following kind of data.

       

      IdNamePercentPass
      1R18.4
      2R18.5
      3R18.8
      4R18.7
      1R27.8
      2R27.9
      3R27.4
      4R27.5
      1R38.5
      2R35.8
      3R38.3
      4R38.2

       

      Name and ID form the composite key.

       

      I trying to achieve the following calculation:

      • First find maximum PercentPass Name wise
        • In this case, it would be : R1 - 8.8, R2 - 7.9, R3 - 8.5
      • Now store that Name in a variable Name_max having maximum PercentPass
        • In this case, it would be R1
      • Store Name in variable Name_max_2 having second maximum PercentPass
        • In this case, it would be R3

       

      I am not able to figure a way to do this.

       

      Please help.

       

      Thanks in advance.

       

      Regards,

      Disha Ahuja