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

Load Good Friday into Master Calendar


Hello,

Im creating a master calendar, and I was asked to load the holidays and I did like this_:

DateHoliDAYS
25-12Christmas
01-01New 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.

1 Solution

Accepted Solutions
anlonghi2
Creator II
Creator II

Hi Iuri,

attached the app with Good Friday calculation.

Best regards

Andrea

View solution in original post

6 Replies
Colin-Albert

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.

ramoncova06
Specialist III
Specialist III

you could get the holidays from a website and then use a mapping function to identify you holidays

Year 2015 Calendar – United States

anlonghi2
Creator II
Creator II

Hi Iuri,

attached the app with Good Friday calculation.

Best regards

Andrea

Not applicable
Author

That will help a lot, thank you!

anlonghi2
Creator II
Creator II

You are welcome

Regards

Andrea

Not applicable
Author

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