6 Replies Latest reply: May 23, 2018 9:43 AM by Novice Qlik RSS

    Count if combined with sum and total

    Novice Qlik

      Hi all

       

      I am constructing a pivot table in Qlik Sense. I am looking for an expression that counts a piece of string (in my case: "< 12 weeks" or "12 weeks +") and then find the overall percentage for that product.

       

      In my pivot table I have 'product' in the rows. then I will add two measures: (1) to find the percentage of those that are "< 12 weeks" for that product (2) to find the percentage of  those that are "12 weeks +" for that product.

       

      So the expression should say, for example, count if "12 weeks +" divide by the total number for product

       

       

      Product        Duration                   Quantity
      apple             < 12 weeks                    123

      banana          12 weeks +                     22
      orange           12 week +                       99
      pear               < 12 weeks                     12
      apple             12 week                           65
      banana          < 12 weeks                      28