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

function:networkday

Hello everybody,

the "networkday" function return the number of working days (Monday-Friday) included between "start_date" and "end_date" excluding public holidays.

I am Italian and Italian  public holidays are different from other countries.
what are the holidays that excludes the function networkday?
How do I consider only the Italian festival?

thak you

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

   In that case you need to specify the holidays in networkday().

   For example you want networkdays between 2006-12-18 and 2006-12-31.

   If you just give this without the specific holidays you will get 10 as output.

   But say you have holiday on 2006-12-25 and 2006-12-26

   Then specify like this

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

 

   and you will get answer as 8.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

   In that case you need to specify the holidays in networkday().

   For example you want networkdays between 2006-12-18 and 2006-12-31.

   If you just give this without the specific holidays you will get 10 as output.

   But say you have holiday on 2006-12-25 and 2006-12-26

   Then specify like this

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

 

   and you will get answer as 8.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
johnw
Champion III
Champion III

Here's an example of loading the holidays from a table, as I wouldn't want to edit the expression manually to insert every holiday.  It includes two approaches - custom "functions", and just the holidays as a variable.  I used to prefer custom functions.  Now I prefer a holiday variable due to limitations in passing parameters to custom functions.

Not applicable
Author

Hi John,

I am unclear of how you have linked the tables.

I have one table called holidays which has one column called Holidays. How do i link this to my working hours calculation, where currently i have my holiday dates at the top set manually.

EG Currently i have Set vHol= '25/12/2012', 26/12/2012;

instead i want to connect to a table from a different db called Holidays, with one column with all holidays in.

Thanks

Laura