<?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: Holiday list for lastworkdate/networkdays not recognized in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051287#M933314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And it did - thank you for your advice and help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Mar 2016 12:24:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-03-01T12:24:10Z</dc:date>
    <item>
      <title>Holiday list for lastworkdate/networkdays not recognized</title>
      <link>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051283#M933310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a Qlikview document where I need to calculate with a "next business day" information - the challenge here is that this is for an international company and depending with which legal entity the individual data records are associated, different public holidays need to be considered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I successfully extracted the public holidays for each entity and concatenated them, following the advice from other posts in this forum. However as I cannot work with a single "HolidayList" value and I did not want to create one variable per country, I tried to map the respective HolidayLists to the records themselves as a field value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Holidays:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"Viz_Date"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+0.5)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;HoliDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"viz_countryregionidName"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Country&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; SELECT *&lt;BR /&gt; FROM "CRM".dbo."Holiday"&lt;BR /&gt; ORDER BY "viz_countryregionidName","Viz_Date" asc;&lt;BR /&gt; &lt;BR /&gt; LIST.Mapping:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Mapping&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Country&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(39)&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;HoliDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(39), ', ') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;HolidateList&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Holidays&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Country&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The public holidays appear to concatenate correctly and get mapped to the records where I would need them for a chart expression, however when I try to calculate the next business day in my expression, the public holidays are ignored. In an example: "WonDate" would be a Friday, the following Monday is a public holiday and I would expect my expression to return Tuesday as the next business day. However I always receive the date for Monday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;timestamp&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;lastworkdate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;WonDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+1 , 1, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;HoliDates&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When copying the field value as a text (without further modifications) into the expression, I do receive the date for Tuesday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am starting to believe that fixed text values and variables are the only way to work with networkdays/lastworkdate.&lt;/P&gt;&lt;P&gt;Could you confirm if my guess is correct and if yes, would you have an idea how I could work with a single variable instead? Is there a way to&amp;nbsp; populate a variable in the LOAD statement for each record that is loaded ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 13:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051283#M933310</guid>
      <dc:creator />
      <dc:date>2016-02-29T13:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Holiday list for lastworkdate/networkdays not recognized</title>
      <link>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051284#M933311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right, you need to pass the list of holiday dates as comma separated arguments to the NetWorkDays() / LastWorkDate() function, you can't use a single argument field that holds a string with these holidays, comma separated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't really understood your sample code, you are using a MAPPING LOAD, but then don't use MAP or APPLYMAP to map your holidays. And I don't see the Holidates field defined in your code, but I guess that field is holding the mapped values somehow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 20:45:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051284#M933311</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-29T20:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Holiday list for lastworkdate/networkdays not recognized</title>
      <link>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051285#M933312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for your fast response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I omitted the code where I am actually mapping it to the final data - I included only this bit in case I had messed up the concat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But then I actually already know I will be stuck with multiple variables, each containing the comma-separated holidays.&lt;/P&gt;&lt;P&gt;Off topic, but related to my particular challenge - can I restrict the peek function in some way? To be used on my original Holidays table, which contains all Holidays as well as the Country reference. Along the line of "peek if country = XXX". Or do I need to create individual data tables for each country I need?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 21:05:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051285#M933312</guid>
      <dc:creator />
      <dc:date>2016-02-29T21:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Holiday list for lastworkdate/networkdays not recognized</title>
      <link>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051286#M933313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The LookUp() function could return the holidays for a specific country.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 21:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051286#M933313</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-29T21:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Holiday list for lastworkdate/networkdays not recognized</title>
      <link>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051287#M933314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And it did - thank you for your advice and help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 12:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Holiday-list-for-lastworkdate-networkdays-not-recognized/m-p/1051287#M933314</guid>
      <dc:creator />
      <dc:date>2016-03-01T12:24:10Z</dc:date>
    </item>
  </channel>
</rss>

