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

Calculate Network days excluding Friday and Holidays

Hi All,

I want to calculate the net workdays between two dates excluding Friday (Since Friday is weekend) and Holidays.

Tried using networkdays(). It is considering Sat and Sun as weekend. Is there a way to change the weekend to Friday.

If anyone came across this scenario please help me out. 

Thanks in advance

 

-Mukesh 

Labels (3)
5 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

One approach would be to add all Fridays into your holiday list. 

-Rob

mukesh19
Contributor II
Contributor II
Author

Hi Bob,

Thanks for the response. If we add Fridays to holidays list, then Saturday and Sunday will also be excluded. But Sat and Sun should be included in the calculation. Since Sat and Sun are working days

mruehl
Partner - Specialist
Partner - Specialist

There is a thread using interval() to solve this:

https://community.qlik.com/t5/QlikView-App-Dev/QLIKview-networkdays-ignore-weekend/m-p/85517

I didn't test it but it looks good for me.

mukesh19
Contributor II
Contributor II
Author

@mruehl  that might work. But the problem is if we join source table with Holiday table that would result in cross join which will lead to performance issues 

mruehl
Partner - Specialist
Partner - Specialist

Maybe the last entry in this thread? You just have to declare all fridays as holidays nad put it in the variable.