4 Replies Latest reply: Mar 27, 2017 9:57 PM by Sunny Talwar RSS

    Aggregate in Script based on limited dimensions

    Nicole van Kooij

      Hi,

       

      I would like to script a Calculated revenue based of a threshold value of 42.

      Ik have the following data (column 1 to 4 source data, column 5 to 7 expected result after scripting.

       

      The result I am looking for is:

      ProductUnitDateRevenueAggr Revenue

      Aggr Revenue

      with threshold

      Revenue

      with threshold

      A12001.01.201710101010
      A14002.01.201720303020
      A12003.01.201715454212
      A14004.01.201755000

       

       

      The result I get at this moment is:

       

      ProductUnitDateRevenueAggr Revenue

      Aggr Revenue

      with threshold

      Revenue

      with threshold

      A12001.01.201710101010
      A14002.01.201720202020
      A12003.01.201715353515
      A14004.01.2017525255

       

      So, the sum/aggr condition on the Revenue column works, except I didn't manage to make clear in my script that this aggregation should be based on only the dimensions product and Date.

       

      Who can help me out?

       

      Thanks in advance,

      Nicole