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

Selecting All employees according to user selection

The table Employees is historical, having all employees in the organization at each month/year.  I need to perform a calculation using the headcount at the month/year selected by the user.

For example, if the user selects July, 2012 the report must count the employees dated at July,2012.

How to count is not difficult, since I have a record counter variable having a 1 (EmpRecordCtr) which can be summed.  The challenge is how to make a set of the employees data for the specific Month/Year selected by the user.  I'm researching on using Set Analysis.  Each record is dated with it's corresponding month/year.  See image.

Employees Table.JPG

2 Replies
MayilVahanan

Hi

Can use count(EmployeeID) instead of EmpRecordCtr for month/year selection

For distinct employee count means, use coun(Distinct EmploeeID)

Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
wgonzalez
Partner - Creator
Partner - Creator
Author

When the user clicks a Month/Year in the multibox QV automatically associates the headcount to the rest of the data, then adjusting it.  I need the full headcount free of association with the rest of the data to make the calculation.

For example: The user clicks on July 2012, there are 1,000 employees on board but only 800 have absenteeism transactions.  QV will associate 800 employees, but I need to make the calculation with the full 1,000.  To overcome that I used this expression with set analysis num(sum({1} EmpRecordCtr)) wish uses the full set of all employees in the application.

The interesting thing happens when the headcount of other months were added into the data.  The user clicks August 2012 when there was 1,200 employees and 700 having absenteeism transactions.  Now I need to perform the calculation with 1,200 employees.

How can I modify the expression to be flexible to selection of different periods in time?

Thanks!