2 Replies Latest reply: Oct 3, 2016 4:40 AM by jagan mohan rao appala RSS

    Fetching Sum of rows of a table in Script

    Supriya R



      I have a table as shown below


      fruitID    fruitvalue

      1              3

      1               4

      2               5

      2               7

      3                9

      3              4

      1               8

      1               9

      Now i need to create a table in script(Load editor) such a way that,it has give sum of fruitvalue for each fruitID

      fruitID    fruitvalue

      1              24

      2               12

      3                13


      I do know that, using table by dimension:fruitID &&  Expression: fruitvalue i can achieve this,but i need to get from scripting itself like it has to loop for specific fruitIDs and get sum of those.


      IS it possible?if  not, Could please share reason for this

      if yes, How could i do this? Any ideas, suggestion is helpful