Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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!

12 Replies
Not applicable
Author

If you reload the data in your file, it also has the correct inline text, and will automatically correct itself.

RedSky001
Partner - Creator III
Partner - Creator III

So I ended up doing this in the script as it was easier... (see attached file)

Not applicable
Author

That did it, thank you so much for your help!