2 Replies Latest reply: Aug 22, 2012 10:36 AM by Mark Sheraton RSS

    Advanced Aggregate

    Jagan Vijayakumar



      Could some one let me know what is aggregate &  advanced aggregate functions and how to use it.



      Jagan. V

        • Re: Advanced Aggregate
          jagan mohan rao appala



          Aggregate functions are Sum, Max, Min, Avg etc., this are straight forward functions.


          Aggr is an Advanced Aggregate function.


          Difference between this two types are


          Aggregation functions straight away calculate the value, where as Advanced Aggregate functions aggreates by given dimension.


          For example



          LOAD * INLINE [

              BillNo, CostPrice, SellingPrice

              1, 1000, 1200

              2, 500, 650

              3, 200, 300



          When we calculate Profit % (SellingPrice/CostPrice) by using

          Aggregate functions:


          = Sum(SellingPrice)/Sum(CostPrice) = 1.264 


          Advanced Aggregation functions:

          = Sum(Aggr(Sum(SellingPrice)/Sum(CostPrice), BillNo))  = 4 (1.2 + 1.3 + 1.5)

          here the profit is calculated by billno and then it is summed up.


          Hope this helps you.




          • Re: Advanced Aggregate
            Mark Sheraton

            You could try looking in the QlikView Reference Manual, page 289 to be specific