6 Replies Latest reply: Apr 3, 2017 3:42 PM by Sunny Talwar RSS

    Rank function with multiple dimensions

    Mike Slottje

      Hi experts,


      I've made a bar chart with my top 10 invoices over the last 4 years.

      Because Qlik doesn't have a function that shows the total sum of these top 10 customers per year, I wanted to use a KPI object to show the total sum of the top 10 invoices in a certain year.

      See the following screenshot (Years are ordered as 2014-2017).test.png

      In the 4 different KPI objects I used the following function 4 times (Max Year, Max Year -1, -2, -3):

      sum({1<Year={"$(=max({<year>}Year))"},[Invoice Number] = {"=rank(sum([Nett Amount new EUR]),4,1) <= 10"}>} [Nett Amount new EUR] )

      The numbers shown in the KPI objects are based on the top 10 invoices over the 4 years, instead of the top 10 invoices per year.

      Could you guys help me out with this one or give me another solution?


      Thanks a lot in advance:)