Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
the part :
1' as [_Holiday] will flag
will flag it as Holiday. Another way (much better) is Mapping Load, see Marcus Sommers Suggestion
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
Not a direct response to your question, but may me helpful: Calculating Holidays in script
I go by Set Analysis:
=count({<Date_In = {'>=$(=date($(vStartDate)))<=$(=date($(vEndDate)))'},_Holiday -= {1} >}COUNTER)
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