Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Networkdays Function

So I want to create an expression that calculates the network days for the month that I select. So I select december, it will give me 16 days as it is 12/1 to 12/22 and there is 16 network days so far. So for November, it would calculate the number of network days in November.

Hope this makes sense.

6 Replies
maxgro
MVP
MVP

if you have a date field d you can try with the monthstart and monthend function

NetWorkDays(MonthStart(Max(d)), MonthEnd(Max(d)))

MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_197527_Pic1.JPG

QlikCommunity_Thread_197527_Pic2.JPG

hope this helps

regards

Marco

Not applicable
Author

Thank you Marco. This is very helpful. So I am assuming this accounts for all US federal holidays?

Simon

MarcoWedel

No, holidays have to be defined as additional parameter(s) in the NetWorkDays() function.

regards

Marco

Not applicable
Author

How do I define holidays in the function?

maxgro
MVP
MVP

this is from QlikView help; as Marco said, holydays are additional parameters

networkdays (start:date, end_date {, holiday})

Returns the number of working days (Monday-Friday) between and including start_date and end_date taking into account any optionally listed holidays. All parameters should be valid dates or timestamps.

Examples:

networkdays ('2007-02-19', '2007-03-01') returns 9 

networkdays ('2006-12-18', '2006-12-31', '2006-12-25', '2006-12-26') returns 8 

Find Net Working Days