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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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