Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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?