<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Exclude holidays using Networkdays() in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Exclude-holidays-using-Networkdays-in-script/m-p/566806#M211455</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for posting this. It seems to be working for me as well but I do have another challenge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to set up a logic that if the End Date is a holiday (from the holiday list) then exclude that day from the holiday list? What I mean is the following:&lt;/P&gt;&lt;P&gt;Holiday: 5 Sep 2017&lt;/P&gt;&lt;P&gt;Using your script, Qlik Sense returns the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="217"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="71"&gt;Start Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="71"&gt;End Date&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="75"&gt;ActualDays&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;2017.09.05&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to return 2 days for the scenario when the End Date is on a Holiday like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 217px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="71"&gt;Start Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="71"&gt;End Date&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="75"&gt;ActualDays&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2017.09.05&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Sep 2017 14:11:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-29T14:11:59Z</dc:date>
    <item>
      <title>Exclude holidays using Networkdays() in script</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-holidays-using-Networkdays-in-script/m-p/566803#M211452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to calculate actual worked days using NetWorkDays(). I have country wise list of start date and end dates and have country wise list of holidays. Each country has different holidays. Now I want to calculate Actual Worked Days country wise . &lt;/P&gt;&lt;P&gt;I have created one chart in the attached QVW file, NetWorkDays() executes perfectly when I create variable but I want to do it in script so that it will calculate Actual Worked Days even if when I do not have selection over the country.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached sample Qvw and excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 06:15:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-holidays-using-Networkdays-in-script/m-p/566803#M211452</guid>
      <dc:creator>upendrarajeshir</dc:creator>
      <dc:date>2014-02-11T06:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude holidays using Networkdays() in script</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-holidays-using-Networkdays-in-script/m-p/566804#M211453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Upendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This quite hard script, but I'm sure it work&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1392102400251717" jivemacro_uid="_1392102400251717"&gt;
&lt;P&gt;Country:&lt;/P&gt;
&lt;P&gt;LOAD Concat(DISTINCT chr(39) &amp;amp; Country &amp;amp;chr(39),',') AS CountryName&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;Book1.xlsx&lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels, table is CountryWorkDates);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Let vCountryList = Peek('CountryName',0,'Country');&lt;/P&gt;
&lt;P&gt;DROP Table Country;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For Each vCountry in $(vCountryList)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [Holiday]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD Concat(chr(39) &amp;amp; Holiday &amp;amp;chr(39),',') AS HD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; FROM Book1.xlsx (ooxml, embedded labels, table is CountryHolidays) Where Country='$(vCountry)';&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Let vHoliday = Peek('HD',0,'Holiday');&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DROP Table Holiday;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; CountryWorkDates:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Country, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StartDate, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EndDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetWorkDays(StartDate,EndDate,$(vHoliday)) as ActualDays&lt;/P&gt;
&lt;P&gt;&amp;nbsp; FROM&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Book1.xlsx&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (ooxml, embedded labels, table is CountryWorkDates) Where Country='$(vCountry)';&lt;/P&gt;
&lt;P&gt;NEXT vCountry&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Let vCountry = Null();&lt;/P&gt;
&lt;P&gt;Let vCountryList = Null();&lt;/P&gt;
&lt;P&gt;let vHoliday = Null();&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;See attached file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 07:08:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-holidays-using-Networkdays-in-script/m-p/566804#M211453</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2014-02-11T07:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude holidays using Networkdays() in script</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-holidays-using-Networkdays-in-script/m-p/566805#M211454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sokkom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its tricky but works for me. Thanks a lot !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 04:18:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-holidays-using-Networkdays-in-script/m-p/566805#M211454</guid>
      <dc:creator>upendrarajeshir</dc:creator>
      <dc:date>2014-02-14T04:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude holidays using Networkdays() in script</title>
      <link>https://community.qlik.com/t5/QlikView/Exclude-holidays-using-Networkdays-in-script/m-p/566806#M211455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for posting this. It seems to be working for me as well but I do have another challenge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to set up a logic that if the End Date is a holiday (from the holiday list) then exclude that day from the holiday list? What I mean is the following:&lt;/P&gt;&lt;P&gt;Holiday: 5 Sep 2017&lt;/P&gt;&lt;P&gt;Using your script, Qlik Sense returns the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="217"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="71"&gt;Start Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="71"&gt;End Date&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="75"&gt;ActualDays&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;2017.09.05&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to return 2 days for the scenario when the End Date is on a Holiday like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 217px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="71"&gt;Start Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="71"&gt;End Date&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="75"&gt;ActualDays&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;2017.09.04&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;2017.09.05&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2017 14:11:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Exclude-holidays-using-Networkdays-in-script/m-p/566806#M211455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-29T14:11:59Z</dc:date>
    </item>
  </channel>
</rss>

