Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

livio218526
Contributor

Dynamic holiday days

Hello to all,

I would like to know if there is a method for calculating all holidays for each year (2017,2018,2019,...), so as to monitor values in the "networkdays" function.

For example, Christmas, Indipendence day, etc....

Thanks,

Livio

7 Replies
agigliotti
Honored Contributor II

Re: Dynamic holiday days

take a look here Exclude holidays using Networkdays() in script

it could help you.

livio218526
Contributor

Re: Dynamic holiday days

Thanks, I'd like to be able to define holidays without the use of an external file.

dapostolopoylos
Contributor III

Re: Dynamic holiday days

Networkdays() function returns the number of working days (5 days working week) between two given dates.

If you want to "flag" the dates as working or not an customise the list per country, at my knowledge, you can't avoid using an external file.

What i have done when i tried to flag working dates for an application and customise this list with the Greek holidays, was to use an external xlsx file  which was the result set of the calculation of working days i did on SQL Server.

If you want to take a look on the SQL script, check this link: https://gist.github.com/dapostolopoylos/69df1c7f83e09bf68680

Keep in mind that if you want to use it for another country you have to do the proper customisations.

Father/Husband/BI Developer
DavidŠtorek
Contributor III

Re: Dynamic holiday days

Hi,

I am using own calendar for this task. I create a calendar in script, than create an inline table with all holidays dates (formated as DM). Than connect to my generated calendar and create flag for holiday. If you need than you can load only rows flaged as holiday and you will have field with all holidays for period for which you create the calendar. It is even possible to take in account Eastern holiday (if you have it in your country).

rittermd
Honored Contributor

Re: Dynamic holiday days

I don't know how you could avoid using an external file.  Every country has different holidays and most companies have a slightly different list of holidays.  You would have to build a list of holidays for your environment.

livio218526
Contributor

Re: Dynamic holiday days

US Calendar

Re: Dynamic holiday days

There is no system to make all lists in field for holidays. Instead, Usually we need to maintain Mapping table to get them.

Community Browser