Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
User6
Contributor
Contributor

Using NetWorkDays function with Holiday

In the Qliksense script I defined the following variable :

Set vDiff = NetWorkDays ([A] , [B] , '05/26/2022', '05/27/2022');

A and B are columns of a table.

 

Assuming :

[A] = 05/25/2022 (Wednesday)

[B] = 05/30/2022 (Monday),

I hope to get as result 2 but I got 4.

It seems to me that the Holidays are not taken into account. Does anyone see a mistake in what I wrote? Thanks in advance 🙂

 

Labels (2)
1 Solution

Accepted Solutions
Or
MVP
MVP

NetWorkDays ('25/05/2022' , '30/05/2022' , '26/05/2022', '27/05/2022')

Or_0-1656584515703.png

 

Looks fine to me. This also works from within a variable and returns 2. Perhaps you have mismatching date formats (in which case the two holidays wouldn't be recognized as dates)? You could check that by replacing them with matching MakeDate() functions, most likely.

View solution in original post

1 Reply
Or
MVP
MVP

NetWorkDays ('25/05/2022' , '30/05/2022' , '26/05/2022', '27/05/2022')

Or_0-1656584515703.png

 

Looks fine to me. This also works from within a variable and returns 2. Perhaps you have mismatching date formats (in which case the two holidays wouldn't be recognized as dates)? You could check that by replacing them with matching MakeDate() functions, most likely.