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

how to integrate a list of holidays into the Networkdays functions

Hi,

If a source containing:

StartDate, EndDate

26-9-2011,3-10-2011

Using the Networkdays it's coming back with 6 workdays, this is correct,

I also have a tabel called Holidays containing:

Holiday

27-9-2011

28-9-2011

In this case the days are a tuesday and a wednesday, how can i integrate this list in the Networkdays function so that my result becomes 4 working days?

attached a qvw with this data

Hope this will be possible.

Kind Regards,

Linda Monincx

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi Linda

The way I have done this in the past is to create a variable containing quoted, comma separated list of dates. I created the variable in script by concatenating the holiday dates. In my blog, I have several articles explaining this and other issues regarding the working day functions in Qlikview.

http://yahqblog.blogspot.com/2010/09/qlikview-working-day-functions.html

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
lmonincx
Creator II
Creator II
Author

Hello Jonathan,

Many thanks for your reply, this really helped!

Kind regards,

Linda Oei-Monincx

  • *

>> OneLine is winnaar Reseller Award QlikView <<

  • OneLine Business *

  • Intelligence

  • Anderstein 2

3953 BA Maarsbergen

Nederland

  • *T: 0343 44 13 16

  • M:* 06 27 86 76 23

  • W:* www.oneline.nl

  • **@: *lmonincx@oneline.nl

Wat is QlikView?: http://bit.ly/in-memory

Meld je hier <http://www.oneline.nl/Producten/QlikView> aan om gratis

QlikView te downloaden

DISCLAIMER: De informatie in dit e-mail-bericht is vertrouwelijk en

uitsluitend bestemd voor de geadresseerde. Niet geautoriseerde verstrekking

aan en gebruik door anderen is niet toegestaan. Door de elektronische

verzending van het bericht kunnen veranderingen in het bericht optreden. Aan

de informatie kan daarom geen rechten worden ontleend.

From: Jonathan Dienst

Sent: maandag 26 september 2011 22:36

To: LMonincx

Subject: - Re: how to integrate a list of

holidays into the Networkdays functions

QlikCommunity <http://community.qlik.com/index.jspa>Re: how to integrate

a list of holidays into the Networkdays functions

created by Jonathan Dienst <http://community.qlik.com/people/jontyd> in

Development (QlikView Desktop) - View the full

discussion<http://community.qlik.com/message/152800#152800

SunilChauhan
Champion
Champion

networkdays( date1,date2, holidadate1,holidadate2,holidadate3,holidadate4,holidadate5,......)

holidaydate includes your  saturaday  and sunday also

Sunil Chauhan
its_anandrjs

Hi,

Change in your code like

NetWorkDays(StartDate,EndDate,'28-9-2011','29-9-2011')

See the attached sample file.

HTH

Rgds

Anand

Not applicable

Hi Linda, try creating a variable called vHolidays

=mid(concat(chr(39) & Holiday & chr(39) &','),1,len(concat(chr(39) & Holiday & chr(39) &';'))-1)

then change the expression to:

NetWorkDays(StartDate,EndDate,$(vHoliday))

Hope this help you