2 Replies Latest reply: Feb 16, 2014 1:55 PM by Nuno Faustino RSS

    Sum a number or flaged items from one point

    Nuno Faustino

      Hi guys,

       

      I have a problem and limited time to solve it. Maybe you can help.

       

      I have data with this configuration:

      DateVALUEFLAG
      01/01/2014201
      02/01/2014181
      03/01/201471
      04/01/2014461
      05/01/201450
      06/01/201461
      07/01/2014171
      08/01/201480
      09/01/2014151
      10/01/2014441
      11/01/2014380
      12/01/2014171
      13/01/2014191
      14/01/2014200
      15/01/2014481
      16/01/2014100
      17/01/2014161
      18/01/2014501
      19/01/2014220
      20/01/2014451
      21/01/2014411

       

      What I want to do is count backwards from the 15/01/2014 date, only the first 5 flagged values. Something like:

      =Sum({$<Date= {"<=15/01/2014"},FLAG = {"1"}>} VALUE)

      but I need to limit the flag to the first 5 occurrences. Is that possible?

       

      Thank you so much for your help.

       

      Kind regards,

      Nuno