Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count If on Qlik Sense

Hi,

I'm trying to create a new KPI on Qlik Sense. Basically, I want this KPI to count how many times the value zero occurs in a set of data. Essentially, I'm counting how many times inventory is zero in a large group of products. It is set that there is a dimension called Products that has all the product names. Then, there is a dimension called Inventory that shows how much inventory there is for each product. I've tried various solutions from the following sites, but none of them seem to work for my data:

How to calculate total count of a specific valu... | Qlik Community

https://community.qlikview.com/thread/28409

Here is what I think should work, but doesn't work:

count({<[Inventory]={'0'}>} Product)

Please suggest what to do.

Thanks!

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Please post a small qlik sense app with some data that demonstrates the problem.


talk is cheap, supply exceeds demand
mgranillo
Specialist
Specialist

Not sure why that doesn't work, but try sum(if([Inventory]=0,1,0))