Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mohsinqlik
Partner - Creator
Partner - Creator

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
jonathandienst
Partner - Champion III
Partner - Champion III

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