0 Replies Latest reply: May 23, 2014 1:16 PM by Bernd Bieker RSS

    How to limit a sum / aggr function

      If using data like in the following example:

       

      ItemCostRank

      ID1

      302
      ID2204
      ID3501
      ID4103

       

      How can I create a sum / aggr function that adds the cost item by item along the rank up to the limit of 85.

      I.e. the sum should stop adding items cost after this limit is reached (in this case it would be ID3=50 + ID1=30, the other items would not be added any more.

       

      If it is not possible with a sum - how can IDs be identified that would fit in the given limit along the sort order "rank"?

       

      Thanks a lot