8 Replies Latest reply: Jun 10, 2016 2:03 PM by Saran De RSS

    Sum for distinct values

    Ankit Tripathi

      Hi all,
      I have a dataset similar to below:

      Trip Id     Amount

      a              10

      b              10

      b              10

      b              10

      c              5

       

      I want sum(amount) for distinct trip ids which should be: 25(10+10+5)
      is aggr() an option?

       

       

      Any solutions?
      Thanks in advance