5 Replies Latest reply: Apr 1, 2017 5:48 AM by Vineeth Pujari RSS

    Reduce Sales with previous calculated value

    Lukas Amann

      Hey Folks,

       

      Iam stuck with a problem.

      The Blue Color is my sample Data and the Orange is the output that should be generated in Script. So basically i need to multiply the Sales with the % Value. The Output is "New Sales X Value", after that, i need to reduce the "New Sales" with the Previous Calculated Value. I do this until a new Key appears and start all over again. In addition, it needs to be reduce based on the calculation Order.

       

      KeyCalculation OrderSalesValueNew SalesNew Sales X Value
      A110003%100030
      A210002%97019,4
      A320004%950,638
      B120002%200040
      B220002%196039,2
      B320004%1920,876,8
      B420002%184436,8
      C15003%50015
      C25004%48519,4

       

      I tried with a for next loop and the previous function. But i didnt manage to find  a solution.

      Someone an Idea?

       

      Lukas