4 Replies Latest reply: Sep 18, 2013 12:20 PM by Gysbert Wassenaar RSS

    SPLIT RECORDS IN SETS HAVING THE SAME sum(Value)

      Hi all,

       

      Let's assume I have a table  with a simple structure:

       

      RecordIDValue
      110
      220
      325
      415
      5100
      ......
      n1000

       

      I would like to ORDER the records by Value (ascending) and then SPLIT the records in 10 sets, each set HAVING THE SAME sum(Value) - that is sum(TOTAL Value)/10.

      The end result would be a chart showing all those 10 sets and the number of records contained in each set. Something like this:

       

      Records Set#Records
      Set150
      Set230
      Set315
      ......
      Set102

       

      Could anyone please suggest a solution for this?

       

      Thanks,
      Carmen