2 Replies Latest reply: Apr 3, 2017 1:43 PM by Ying Zhou RSS

    front-end calculation - sales for top customers in Qlik Sense

    Ying Zhou

      Hi All,

       

      I am working on a Qlik Sense project and I am stuck in fixing one issue for 3 days. The following is the description of the issue:

          

      BrandCustomerSalesTop 25% Customer
      AC1800C1
      AC2700C2
      AC3600-
      AC4500-
      AC5400-
      AC6300-
      AC7200-
      AC8100-

      I am using the variable to fetch the Top 25% Customer : aggr(if(rank($(vTotal_Sales))<=0.25* count (distinct Customer)),Customer),Customer).

       

      This variable works perfectly and I am sure the data model is correct. However, when I am pulling one more calculated Dimension for Brand_Top_Calculation: (if len($(vTotal_Sales))>0, Brand, null()), some of the Top 25% Customer have the corresponding  Brand_Top_Calulation; but some of the other 25% customer do not have.

       

      Can anyone hep me out or provide any thoughts you have for this issue?

       

      Thanks so much in advance!

       

      Regards,

      Ying

        • Re: front-end calculation - sales for top customers in Qlik Sense
          Sunny Talwar

          Can you share a sample or screenshot to show what the issue is with and without the additional calculated dimension?

            • Re: front-end calculation - sales for top customers in Qlik Sense
              Ying Zhou

              Hi Sunny,

               

              Thanks for the reply!

               

              Sorry there is a typo in my original post. the Brand_Top_Calculation is: if(len($(vTop_Customers))>0, Brand,null()). vTop_Customers is the variable I am using to get the top 25% customers listed in the above post.

               

              Here is the sample without the Brand_Top_Calculation

                  

              BrandCustomerSalesTop 25% Customer
              AC1800C1
              AC2700C2
              AC3600-
              AC4500-
              AC5400-
              AC6300-
              AC7200-
              AC8100

              -

              Here is the sample with the Brand_Top_Calculation:

                   

              BrandCustomerSalesTop 25% CustomerBrand_Top_Calculation
              AC1800C1A
              AC2700C2-
              AC3600--
              AC4500--
              AC5400--
              AC6300--
              AC7200--
              AC8100--

               

              Basically, I want to show A in Brand_Top_Calculation in the first two row as C1 and C2 are the top 25% customers in this data set, but one of them is correctly populated, but the other gives me the null value.

               

              I think the issue might lie in the calculation of top 25% customers, but still cannot figure out the exact issue.

               

              Thank you so much for the help!

               

              Regards,

              Ying