12 Replies Latest reply: Jun 3, 2013 9:07 AM by Melanie Feller RSS

    CountIf CumulativeSum is < value.

      I have three fields, Item, Customer and Percent Sales.

      For each Item, I need to know how many Customers it takes to accumulate at least 80% sales.

       

      For instance:

      ItemCustomerPercentSalesCumulative Sales
      1110%10%
      1225%35%
      1310%45%
      1420%65%
      1520%85%
      165%90%
      175%95%
      185%100%
      215%5%
      225%10%
      235%15%
      245%20%
      2520%40%
      2620%60%
      2725%85%
      2810%95%
      295%100%

       

      Would give me the results:

      ItemCount:CumulativeSales>=80
      15
      27

       

      In Excel I could do a countif(CumulativeSales<=.8)+1 

       

      How could I do this in Qlikview?

      Please help with the cummulative sum and the count statement

      Thank you!