Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Partner
Partner

Calculate working days by only excluding holiday

Dear All,

I want to calculate working days by excluding holidays.

Qlik have Networkdays function to calcualte this but it excludes saturday and sunday along with holiday when calculating working days.But i want to calculate working days including weekends, it should consider saturday and sunday as a holiday only if it falls on holiday list.

I want to achieve this in script level i.e on back end.

Please find attached document

Regards,

Mohsin

1 Reply
Highlighted
MVP
MVP

Re: Calculate working days by only excluding holiday

If you have a master calendar, then the best way to do this is to add a derived "working_day" field to the calendar that follows the rules you require (1 for work days, 0 for non-work days). Then it is simple to calculate the number of working days by just summing that field for the date range in question.

Offsets (FirstWorkDate / LastWorkDate) are slightly more difficult.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein