8 Replies Latest reply: Mar 8, 2017 11:48 AM by Giulio Andrea Toscano RSS

    A simple n% filter

    Giulio Andrea Toscano

      Hi all,



      I am becoming crazy I cannot find the right way for create a filter for "top" Customer. I just want to separate the VIP customer from the other one.

      I need just a dimension to put in my filter pannel in order to avoid that my VIP customers can distort my analysis.


      I am trying with the following expression, but doesn't work:

      if(aggr(sum([sales price]),[product name],[customer id]) / aggr(sum([sales price]),[product name])>0.1 ,'VIP','Normal')


      ideally the following should be the right solution, but Qlik show me an error message when I try to create this field:

      if(aggr(sum([sales price]),[product name],[customer id]) / sum( total <[product name]> [sales price]) >0.1 ,'VIP','Normal')


      attached a test application.


      Any help would be really appreciated.


      N.B. I would like to find a solution directly in the front end without touching the script. I need only a dimension as my final output.


      Thanks, Giulio