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: 
m_woolf
Master II
Master II

Set Analysis Question

I have a chart where the dimensions are Department and MonthYr.

I need an expression that will count the Employees in each dept who have total workhours >0.

I have tried many things, but no joy.

3 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Something like this?:

=sum(aggr(if (sum(WorkHours) > 0, 1), Employee, Department, MonthYr))

sunny_talwar

Another option would be to create a key in thr script...

LOAD Department,

     MonthYr,

     AutoNumber(Department&'|'&MonthYr) as Key

     ...

FROM ....

and then this

Sum({<Key = {"=Sum(WorkHours) > 0"}>}WorkHours)

effinty2112
Master
Master

Hi M W,

Have you tried:

Count({$<Employee = {"=sum(workhours) > 0"}>}Employee)

Cheers

Andrew