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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
bazzaonline
Creator
Creator

Nils %

Hello,

I have a field of data containing various results ranging from 0 - 10000, I was to write an expression that calculates the % of nils per month.

EG, count all the 0's in the month and divide by the total number of results.

So 0, 0, 0, 1, 1, 2, 2, 3, 4, 5 would equal 30%.

Thank you

Labels (1)
5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

count( {<SomeField={0}>} SomeField) / count(SomeField)


talk is cheap, supply exceeds demand
bazzaonline
Creator
Creator
Author

Doesn't seem to work??

Not applicable

count( if(SomeField=0), SomeField) / count(SomeField)

Not applicable

HI

TRY THIS

=COUNT({  <F1={'0'}> }F1)/COUNT(F1)

cspencer3
Creator II
Creator II

or

sum(if(Field=0,1,0)) / count(Field)