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

Count of rows with no nulls?

Hi,

I have a requirement where I need to count the number of rows in a column which has no nulls.

can anyone please help me solving this requirement.

Please find the attached which has example .

Thanks

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you use the expression:

avg(Days)

Avg will ignore nulls, therefore giving you the correct answer in your example.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you use the expression:

avg(Days)

Avg will ignore nulls, therefore giving you the correct answer in your example.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

swuehl
MVP
MVP

Nicholas,

and Avg() will also ignore your empty Days values (they are not NULL, they still show a value in your sample, have a look at the list box, there is an empty entry) and also all values that are not a number.

Hence, as Rob suggested, Avg(Days) will do the Job perfectly in your setting.

If you want to keep to your original approach using a division, you could do it like

=sum(Days) / NumericCount(Days)

sunny_talwar

Looking to do this in the text box or the chart itself?

sujeetsingh
Master III
Master III

Sum(if(LEN(Field)=0,1)