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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
brindlogcool
Creator III
Creator III

Working Days

Hi,

How to calculate the number of working days for a month.I understand we can use the network days. But i have an issue like if there are two employees A and B. A will be full time and B will be part time he will be working 3 days a week. So how to calculate the working days for the employee B in Qlikview.

3 Replies
Anonymous
Not applicable

It is impossible to give an exact answer because the rules for the working dyas are not specified.  So, I go with the next three assumptions:
1. You have a "calendar" table which contains at least Month and Date fields.

2. Employee B works on Monday, Tuesday, and Wednesday.

3. There are no holidays for B.

In this case, you can use this:

WorkDaysB:

LOAD

Month,

count(distinct if(weekday(Date)<3,Date)) as WorkDaysB

RESIDENT Calendar

GROUP BY Month;

Regards,

Michael

brindlogcool
Creator III
Creator III
Author

Thanks Michael,

How about Working days * (3/5).

Anonymous
Not applicable

It all depends on the specific rules, which are still unknown.  It works as approxiamtion, but not as the exact count.  For example, using the same assumption (Monday to Wednesday), in February 2012, we have 21 workdays for A, and 12 for B.  If use 3/5 rule, you get 12.6 for B - or 13 if round to integer.  If this precision is enough in your case, feel free to use it.