Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
markp201
Creator III
Creator III

Networkdays bug?

NETWORKDAYS('09/01/2017','09/10/2017','09/04/2017') returns 5

NETWORKDAYS('09/01/2017','09/10/2017',CONCAT(CHR(39) & DATE(Observed) & CHR(39),',')) returns 6

CONCAT(CHR(39) & DATE(Observed) & CHR(39),',') is the following

'01/01/2014','01/01/2015','01/01/2016','01/01/2018','01/01/2019','01/01/2020','01/01/2021','01/01/2024','01/02/2017','01/02/2023','05/25/2015','05/25/2020','05/26/2014','05/27/2019','05/27/2024','05/28/2018','05/29/2017','05/29/2023','05/30/2016','05/30/2022','05/31/2021','07/03/2015','07/03/2020','07/04/2014','07/04/2016','07/04/2017','07/04/2018','07/04/2019','07/04/2022','07/04/2023','07/04/2024','07/05/2021','09/01/2014','09/02/2019','09/02/2024','09/03/2018','09/04/2017','09/04/2023','09/05/2016','09/05/2022','09/06/2021','09/07/2015','09/07/2020','11/22/2018','11/23/2017','11/23/2018','11/23/2023','11/24/2016','11/24/2017','11/24/2022','11/24/2023','11/25/2016','11/25/2021','11/25/2022','11/26/2015','11/26/2020','11/26/2021','11/27/2014','11/27/2015','11/27/2020','11/28/2014','11/28/2019','11/28/2024','11/29/2019','11/29/2024','12/24/2021','12/25/2014','12/25/2015','12/25/2017','12/25/2018','12/25/2019','12/25/2020','12/25/2023','12/25/2024','12/26/2016','12/26/2022','12/31/2021'

Can we use an expression for the holidays or do we have to hard-code?

1 Solution

Accepted Solutions
sunny_talwar

May be try this

NETWORKDAYS('09/01/2017','09/10/2017', $(=Concat(Chr(39) & Date(Observed) & Chr(39),',')))

View solution in original post

3 Replies
sunny_talwar

May be try this

NETWORKDAYS('09/01/2017','09/10/2017', $(=Concat(Chr(39) & Date(Observed) & Chr(39),',')))

markp201
Creator III
Creator III
Author

BINGO - many thanks

vishsaggi
Champion III
Champion III

Did you try using this in a variable and using that variable in your network function. Like

In your variable overview add like vHolidays then add your dates with comma seperated.

Then use like

= NETWORKDAYS('09/01/2017','09/10/2017', $(vHolidays))

Ref:Guide

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