Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count numbers of occurrences of a particular field

I've a field that descibe how many hours a employee have been sick. I would like to count have many uniqe employees that have been sick. So not the time the numbers of occurrences there is a value in that field.

Thanks in advance

5 Replies
swuehl
MVP
MVP

Not sure I understand, maybe

=Count(DISTINCT EmployeeID)

?

Edit: Or maybe

=Count({<SickHours = {">0"}>} DISTINCT EmployeeID)

sunny_talwar

May be this:

Count(DISTINCT {<SickHour = {'*'}>}EmployeeID)

Not applicable
Author

No. I've a field (sickleave) that have values like 2, 3, 6, 8, 8... but there also rows that are empty(null) and for every row that have a value I would like count that row.

sunny_talwar

Try this:

Count(DISTINCT {<sickleave = {'*'}>}EmployeeID)

swuehl
MVP
MVP

if you want to count the records without NULL,  a simple

=Count(sickleave)

should do. But as I understood, you want to do a distinct employee count, right? So how are employee and sickleave fields related to each other? Does Sunny's expression work out of the box?