
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Networking days in qliksense
Hi All,
I have below table:-
Here I am calculating Loggged_Wkg_Days using this logic :-
Netoworkdays(Issue_recd_date_new, Loggged_Date_new)
The output is giving me extra result. For instance:-
Feb 2022
Issue recd date is 21/02/2022(21st feb-Monday) and logged date is 28/02/2022 (28th feb-Monday)
So ideally network days should be 5 (excluding Saturday sunday). However it is giving me 6 which is not correct.
I am not able to understand why it is giving me additional records. Can anyone please help ?
Thanks in advance
@sunny_talwar @Kushal_Chawda @swuehl
Feb 2022- the issue was recd on
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
so
what about
Netoworkdays(Issue_recd_date_new, Loggged_Date_new) -1
?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi
have a look in the main script for this variable may be :
SET FirstWeekDay=0;
try to set 0 or 1 and see what the function return.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your quick response.
I tried it. I changed it from 0 to 1 but it didn't worked.
Thanks


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
so
what about
Netoworkdays(Issue_recd_date_new, Loggged_Date_new) -1
?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @brunobertels
Thanks a lot !

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The networkdays function returns the number of working days (Monday-Friday) between and including start_date and end_date taking into account any optionally listed holiday.
So this is because logged date is 28/02/2022 (28th feb-Monday) and networkdays function takes the Monday so one more extra day is causing value as 6


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just subtracting 1 from the networkdays() result may lead to other problems.
calculate the working days from 20/02/2022 to 27/02/2022 (sun - sun) will return 4, while I think you would expect 5.
It might be better to explicitely tell Qlik if you want the last or first date not to be considered in the calculation, by adding one to the start date or removing 1 from the end date in the function arguments.
Or maybe 6 working days are correct, if the issue persists from Mon to Mon, and you can't tell the exact hours.
