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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count with if condition

I have an expression that is wrong, but should show what I want to do:

COUNT(

  if(((SUM(krankstunden_netto)/SUM(sollstunden_netto))*100)=0,1,0)

)

I want to count the value 1 when the result of the expression is 0

How do I do this correctly in Qlikview?

2 Replies
Not applicable
Author

Try something like:

Count({<Stock_Code = {"=if(((SUM(krankstunden_netto)/SUM(sollstunden_netto))*100)=0,1)"}>}Stock_Code)

Replace Stock_Code with your own field

Not applicable
Author

Perhaps creating a flag in the back end using the same logic, then counting where field = 0 in the set analysis.

Good Luck,

Pravesh