<?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 Problem with NetWorkDays() by including holidays in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233342#M84879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I think that you only need to pass the values in the field to a variable than can be expanded to an actual string, that is what NetWorkDays() is expecting. So try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;load concat(date(FeierTG), chr(39) &amp;amp; ',' &amp;amp; chr(39)) as Feiertageresident tblFeiertage; LET vFeiertage = chr(39) &amp;amp; Peek('Feiertage', 0) &amp;amp; chr(39); // chr(39) is the single quote&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Check that the dates are returned as strings 'DD/MM/YYYY' and that the function works fine.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;EDIT: Using LET instead of SET works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Dec 2010 17:00:56 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2010-12-27T17:00:56Z</dc:date>
    <item>
      <title>Problem with NetWorkDays() by including holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233341#M84878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I try to get the networkdays for the last year, beginning with the latest loaded date. If I do not include the holidays, the function is working well.&lt;/P&gt;&lt;P&gt;If I include the holidays, the days will not change.&lt;/P&gt;&lt;P&gt;Here is my function, which is added to a textbox:&lt;/P&gt;&lt;P&gt;=NetWorkDays((makedate(year(max(Datum))-1, Month(max(Datum)), Day(Max(Datum)))), max(Datum), Feiertage)&lt;/P&gt;&lt;P&gt;The "Feiertage" is loaded in the script as follows:&lt;/P&gt;&lt;P&gt;tblFeiertage:&lt;BR /&gt;crosstable(FTJahr,FeierTG,1)&lt;BR /&gt;LOAD Beschreibung,&lt;BR /&gt; [2010],&lt;BR /&gt; [2011],&lt;BR /&gt; [2012],&lt;BR /&gt; [2013],&lt;BR /&gt; [2014],&lt;BR /&gt; [2015],&lt;BR /&gt; [2016],&lt;BR /&gt; [2017],&lt;BR /&gt; [2018],&lt;BR /&gt; [2019],&lt;BR /&gt; [2020],&lt;BR /&gt; [2021],&lt;BR /&gt; [2022],&lt;BR /&gt; [2023],&lt;BR /&gt; [2024],&lt;BR /&gt; [2025],&lt;BR /&gt; [2026],&lt;BR /&gt; [2027],&lt;BR /&gt; [2028],&lt;BR /&gt; [2029],&lt;BR /&gt; [2030]&lt;BR /&gt;FROM&lt;BR /&gt;F:\QlikView\Anwenderdateien\FeiertageDE.xls&lt;BR /&gt;(biff, embedded labels, table is Tabelle1$);&lt;BR /&gt;&lt;BR /&gt;load concat(date(FeierTG), ',') as Feiertage&lt;BR /&gt;resident tblFeiertage;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do I do wrong? Can anybody help me in this problem?&lt;/P&gt;&lt;P&gt;I really appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;NewQlikie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 16:20:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233341#M84878</guid>
      <dc:creator>newqlikie</dc:creator>
      <dc:date>2010-12-27T16:20:47Z</dc:date>
    </item>
    <item>
      <title>Problem with NetWorkDays() by including holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233342#M84879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I think that you only need to pass the values in the field to a variable than can be expanded to an actual string, that is what NetWorkDays() is expecting. So try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;load concat(date(FeierTG), chr(39) &amp;amp; ',' &amp;amp; chr(39)) as Feiertageresident tblFeiertage; LET vFeiertage = chr(39) &amp;amp; Peek('Feiertage', 0) &amp;amp; chr(39); // chr(39) is the single quote&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Check that the dates are returned as strings 'DD/MM/YYYY' and that the function works fine.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;EDIT: Using LET instead of SET works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 17:00:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233342#M84879</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-12-27T17:00:56Z</dc:date>
    </item>
    <item>
      <title>Problem with NetWorkDays() by including holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233343#M84880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case it's useful, attached is an example of setting up custom firstworkdate and networkdays functions with a holiday list from a data source. Below is the relevant portion of the script:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Holidays:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Holiday&lt;BR /&gt;3/15/2010&lt;BR /&gt;3/10/2010&lt;BR /&gt;2/15/2010&lt;BR /&gt;1/1/2010&lt;BR /&gt;];&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;AllHolidays:&lt;BR /&gt;LOAD concat(num(Holiday),',') as AllHolidays RESIDENT Holidays;&lt;BR /&gt;LET customfirstworkdate = 'firstworkdate($1,$2,' &amp;amp; peek('AllHolidays') &amp;amp; ')';&lt;BR /&gt;LET customnetworkdays = 'networkdays($1,$2,' &amp;amp; peek('AllHolidays') &amp;amp; ')';&lt;BR /&gt;DROP TABLE AllHolidays;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 22:25:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233343#M84880</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-12-27T22:25:49Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Problem with NetWorkDays() by including holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233344#M84881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much. It worked.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2010 09:47:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233344#M84881</guid>
      <dc:creator>newqlikie</dc:creator>
      <dc:date>2010-12-28T09:47:31Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Problem with NetWorkDays() by including holidays</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233345#M84882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;thanks a lot for your answer, but I could not solve the problem with your suggestion.&lt;/P&gt;&lt;P&gt;I finally fixed it with John's suggestion.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2010 09:49:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-NetWorkDays-by-including-holidays/m-p/233345#M84882</guid>
      <dc:creator>newqlikie</dc:creator>
      <dc:date>2010-12-28T09:49:29Z</dc:date>
    </item>
  </channel>
</rss>

