5 Replies Latest reply: Jul 8, 2011 12:53 PM by DANIEL CHOTZEN RSS

    count how many rows above current row totals in 3000$

    DANIEL CHOTZEN

      hi,

      let me try to explain....

      I have a table with few dimensions and one expression

      I need for each raw to add a new field which  will count how many rows ABOVE each raw makes up a certain amount

       

      for example:

      if I have a table with sales per day, I want to know how many days totals in 3000 (E.G.)

       

       

      its kinda like doing a rolling sum based on count just the opposite, meaning doing a rolling count based on sum

      the reason i need the number of rows is because then i can use this number of rows to calculate a rolling avg on another expression in the table

       

       

      I don't mind if it is done in the script. i prefer some more dynamic way of doing this but any idea will work

       

       

      the best iv come up with until now is reading one raw at a time in the script and loop on the previous rows till i get the sum the count the number of loops

      i can also do it in a macro

      but i thought maybe some of you can start a new idea , one that is more QVway

       

      any ideas?

       

      Mansyno

       

      Message was edited by: wizardo: changed the title of the discussion