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

Hello friends, how do you exclude Bank Holidays in Master Calender or in Date calculations?

Hello amigos,

Can anyone tell me how I can remove Bank Holidays from date based calculations in QlikView? I am not sure if there is an approach in Master Calender.

I am not sure how to do it

14 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

the part :

1' as [_Holiday] will flag

will flag it as Holiday. Another way (much better) is Mapping Load, see Marcus Sommers Suggestion

jblomqvist
Specialist
Specialist
Author

Hi Marcus and Jonathan,

Thank you so much for your responses.

I think I got that working and get a "1" where a date is a bank holiday.

Is there a simple example you can share where now I can minus the bank holiday days between two date fields? E.g. Calculate difference between StartDate and EndDate minus HolidaysFlag?

Sorry I am quite new so just want to check the logic

Anonymous
Not applicable

Not a direct response to your question, but may me helpful: Calculating Holidays in script

jpenuliar
Partner - Specialist III
Partner - Specialist III

I go by Set Analysis:

=count({<Date_In = {'>=$(=date($(vStartDate)))<=$(=date($(vEndDate)))'},_Holiday -= {1} >}COUNTER)

Not applicable

It depends on if you actually need the weekend and holiday dates in your master calendar or not. If you don't need these I would suggest not having them within the load and so natively any day counts you do between dates will automatically not include these.

This means simple expressions with less set analysis required etc.

You could do this by just adding a where clause to your calendar load

Where networkdays(TempDate,TempDate, vHolidays)=1

vHolidays in this example is a variable in which you have loaded all your holiday dates

hope that helps

Joe