Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Im creating a master calendar, and I was asked to load the holidays and I did like this_:
Date | HoliDAYS |
---|---|
25-12 | Christmas |
01-01 | New Year |
---- | |
----- |
Here part of my script:
if (Mid(Date(TempDate,'DDMMYYYY'),1,4)=2512,'Christmas',
if (Mid(Date(TempDate,'DDMMYYYY'),1,4)=0101,'New Year'
.......
Do you know how can I load the Good Friday or the condition to achieve this?
I found an expression for Excel, but i cant still translate it to qlikview:
=FLOOR(DATE(B2;5;DAY(MINUTE(B2/38)/2+56));7)-36
Thanks for your help.
Hi Iuri,
attached the app with Good Friday calculation.
Best regards
Andrea
The problem with Easter is that it is a moving target. the dates for Good Friday etc. are dependant on the lunar calendar not fixed dates. The simplest solution is to load a table listing the dates of the moving holidays for each year.
Christmas is easy as it is always Dec 25th.
Of course you could use the lunar date functions in QlikView to calculate when Easter falls but I would go for the easy option of a lookup table.
Your lookup table for Easter dates will need to use the full date and not just the day and month.
you could get the holidays from a website and then use a mapping function to identify you holidays
Hi Iuri,
attached the app with Good Friday calculation.
Best regards
Andrea
That will help a lot, thank you!
You are welcome
Regards
Andrea
Dude you a legend!! Thanks!!
For anyone looking for anlonghi2 solution but consolidated for use in a load script please see attached.
I consolidated all the variables into the 3 required components.
Regards,
Jasper