8 Replies Latest reply: Aug 24, 2017 10:31 AM by Mohan Kumar RSS

    How to find sum Top n value of each dimension?

    Mohan Kumar

      Hello Qlikers,




      I wanted to find spend of top 2 customers for each category. I tried using the expression,

      Sum({<CUSTOMER = {"=rank(Aggr(sum(Value),CUSTOMER,CATEGORY))<=2"}>} Value)


      this expression is working fine when I select any category but when I remove selection expected value isn't correct. I have attached sample .qvf with this discussion for your convenience.


      Looking for help..!!


      Thanks and Regards,