5 Replies Latest reply: Apr 23, 2014 4:51 AM by Dariusz Mielczarek RSS

    FirstSortedValue with double values

    Richard van den Braak

      Hi,

      Who can help me solving this problem.

       

      I'm using a script to select the value of the lowest Koers and the highest Koers

      It works correct as long there are no double Koers values

      If there is a double Value I want to select the latest date.

       

      DateMaxKoers

      LOAD

        FirstSortedValue(Date, -Koers) AS DateMaxKoers

      Resident Koersen;

       

      LOAD

        FirstSortedValue(Date, Koers) AS DateMinKoers

      Resident Koersen;

       

      I expect    as DateMaxKoers      16-04-2014     11,95

                     as DateMinKoers        14-04-2014     11,75

       

      Date     Koers
      17-04-201411,91
      16-04-201411,95
      15-04-201411,84
      14-04-201411,75
      11-04-201411,83
      10-04-201411,76
      09-04-201411,77
      08-04-201411,75
      07-04-201411,94

       

      Thanks for thinking with me.