<?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: Problems with HOLIDAYS in Date functions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65178#M10809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;concat with chr(39)?? Remove those to start. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jun 2018 06:04:17 GMT</pubDate>
    <dc:creator>bramkn</dc:creator>
    <dc:date>2018-06-08T06:04:17Z</dc:date>
    <item>
      <title>Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65173#M10804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developing a Qlikview dashboard and I have a table where I load the bank holidays by country:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;COUNTRY_HOLIDAYS_LIST: &lt;BR /&gt;LOAD DISTINCT ISO_CODE, &lt;BR /&gt;CONCAT(DISTINCT Chr(39) &amp;amp; BANK_HOLIDAY &amp;amp; chr(39), ',') AS COUNTRY_HOLIDAYS &lt;BR /&gt;RESIDENT BANK_HOLIDAY &lt;BR /&gt;GROUP BY ISO_CODE; &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm trying is to use the country holiday list in date function like LastWorkDate. I tried to create a $function but it's not working. My last try is using the lookup function:&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;CODE&gt;&lt;BR /&gt;LOAD PRIMARY_KEY, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(START_DATE, 4, &lt;STRONG&gt;Lookup('COUNTRY_HOLIDAYS', 'ISO_CODE', ISO_CODE, 'COUNTRY_HOLIDAYS_LIST')&lt;/STRONG&gt;)) AS EXPECTED_ARRIVAL_DATE,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Lookup('COUNTRY_HOLIDAYS', 'ISO_CODE', ISO_CODE, 'COUNTRY_HOLIDAYS_LIST')&lt;/STRONG&gt; AS CTRY_BH_TEST&lt;BR /&gt;RESIDENT FACT_ORDER_DETAIL_VIEW;&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As you can see, I put the same lookup function in a test field called CTRY_BH_TEST. When I reload the script, this field gets the Bank Holidays list by country correctly:&lt;/P&gt;&lt;P&gt;'01/01/2018','01/05/2018', etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if I look to the EXPECTED_ARRIVAL_DATE, I found that some expeted dates are 01/05/2018.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been working a whole week to resolve this and I'm going mad. Anyone can help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 12:17:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65173#M10804</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-06T12:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65174#M10805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if the lookup() will be treated as a valid holiday-listing within the lastworkdate() or if it is just ignored. Therefore try it with a evaluate-wrapping like: evaluate(lookup(...))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 14:48:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65174#M10805</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-06-06T14:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65175#M10806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try using mapping tables and apply maps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 14:54:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65175#M10806</guid>
      <dc:creator>bramkn</dc:creator>
      <dc:date>2018-06-06T14:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65176#M10807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the advice!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sadly, it didn't solve my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 07:37:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65176#M10807</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-07T07:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65177#M10808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the advice!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, it didn't work. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made this mapping table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;COUNTRY_HOLIDAYS_LIST: &lt;BR /&gt;mapping LOAD DISTINCT ISO_CODE, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONCAT(DISTINCT Chr(39) &amp;amp; BANK_HOLIDAY &amp;amp; chr(39), ',') AS COUNTRY_HOLIDAYS &lt;BR /&gt;RESIDENT BANK_HOLIDAY &lt;BR /&gt;GROUP BY ISO_CODE;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;LOAD PRIMARY_KEY, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(LastWorkDate(START_DATE, 4,&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('COUNTRY_HOLIDAYS_LIST', ISO_CODE, NULL()) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) AS EXPECTED_ARRIVAL_DATE, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('COUNTRY_HOLIDAYS_LIST', ISO_CODE, NULL()) AS CTRY_BH_TEST &lt;BR /&gt;RESIDENT FACT_ORDER_DETAIL_VIEW;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I obtained the same result&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 09:17:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65177#M10808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-07T09:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65178#M10809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;concat with chr(39)?? Remove those to start. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 06:04:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65178#M10809</guid>
      <dc:creator>bramkn</dc:creator>
      <dc:date>2018-06-08T06:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65179#M10810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That doesn' work. You need to put the dates between apostrophes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you put the next expression in a text box (format DD/MM/YYYY):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;=LastWorkDate('27/04/2018', 3, 01/05/2018,10/05/2018,21/05/2018)&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will show you the date 01/05/2018 instead of 02/05/2018.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 07:01:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65179#M10810</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-08T07:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65180#M10811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess your problem lies in the fact that LastWorkDate() expects a variable list of parameters, not a variable containing a variable list of parameters. AFAIK you cannot do it that way. Patching a statement with the return value from a function call in that same statement will almost certainly cause problems with statement optimizers and precompilers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$-sign expansion won't help either, because the expansion will be performed only once when the LOAD statement is parsed, and not row-by-row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you should try with a FOR loop and a separate CONCATENATE LOAD for each individual ISO CODE value. That code would not look very smart, but at least it will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 11:25:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65180#M10811</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-06-08T11:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65181#M10812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer, Peter!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of FOOR loop do you have in mind ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to put one country bank holidays into a variable, like GERMANY_HOLIDAYS, and when using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LastWorkDate(start_date, 3, $(&lt;EM&gt;GERMANY_HOLIDAYS&lt;/EM&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked quite well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem in here is putting a conditional (IF/SWITCH) has holidays expression... because we use lastworkdate, firstworkdate, networkdates, etc... so many times.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 14:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65181#M10812</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-08T14:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65182#M10813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In general a variable will always work if their content if they is called looked like as had you written it manually. In your case it's not a valid list of dates else it are calculations like 1 / 5 / 2018 = 0.0xxxxxx. Instead of this your variable-content should be look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;'01/05/2018','10/05/2018','21/05/2018'&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This meant you need to add single-quotes to each date during the concat() or loop-generation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beside this I personally would probably use a different approach by flagging working- and holidays within a master-calendar. I use this approach since many years and it worked very well whereby I have only one holiday-list. In your case are multiple ISO listings necessary and therefore I think I would create for it a kind of special calendar (beside a normal master-calendar) in which each ISO had itsown records (just concatenating them) and linking tis table per combined key of ISO and date to your other tables. Here an examples to what is meant: &lt;A href="https://community.qlik.com/docs/DOC-14220"&gt;Master Calendar with movable holidays&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2018 08:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65182#M10813</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-06-09T08:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65183#M10814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15285411940885534 jive_text_macro" jivemacro_uid="_15285411940885534" modifiedtitle="true"&gt;
&lt;P&gt;// The Facts table determines which ISO Codes should produce Holiday lists&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ListOfISOCodes:&lt;/P&gt;
&lt;P&gt;LOAD Concat(DISTINCT chr(39) &amp;amp; ISO_CODE &amp;amp; chr(39), ', ') AS ListOfISOCodes RESIDENT FACT_ORDER_DETAIL_VIEW;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LET vISOCodes = Peek('ListOfISOCodes');&lt;/P&gt;
&lt;P&gt;DROP Table ListOfISOCodes;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR Each vISOCode in $(vISOCodes)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;// Will create a list only if at least one holiday can be found !&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ListOfHolidays:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD Concat(DISTINCT ', ' &amp;amp; Chr(39) &amp;amp; BANK_HOLIDAY &amp;amp; chr(39), '') AS ISOHolidays&lt;/P&gt;
&lt;P&gt;&amp;nbsp; RESIDENT BANK_HOLIDAY&lt;/P&gt;
&lt;P&gt;&amp;nbsp; WHERE ISO_CODE = '$(vISOCode)';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET vISOHolidays = Peek('ISOHolidays');&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DROP Table ListOfHolidays;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;// Nevermind the missing comma. We may encounter ISO Codes without Holiday lists...&lt;/P&gt;
&lt;P&gt;&amp;nbsp; NewFactsTable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD PRIMARY_KEY, START_DATE, ISO_CODE,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(LastWorkDate(START_DATE, 4 $(vISOHolidays))) AS EXPECTED_ARRIVAL_DATE&lt;/P&gt;
&lt;P&gt;&amp;nbsp; RESIDENT FACT_ORDER_DETAIL_VIEW&lt;/P&gt;
&lt;P&gt;&amp;nbsp; WHERE ISO_CODE = '$(vISOCode)';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET vISOHolidays =;&lt;/P&gt;
&lt;P&gt;NEXT vISOCode&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks a bit rough but it seems to work allright. The script also takes into account that some ISO_CODE values may lack a list of holidays in table BANK_HOLIDAY. In that case LastWorkDate() doesn't get a faulty parameter list &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2018 10:47:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65183#M10814</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-06-09T10:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65184#M10815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use mapping load instead of lookup&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Jun 2018 11:40:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65184#M10815</guid>
      <dc:creator>arvind1494</dc:creator>
      <dc:date>2018-06-09T11:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65185#M10816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer, but I don't see it as a good solution for my purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I inherited this code and they use a parcial solution by counting the total holidays between two dates that every row has, but that's not the approach I want. I need to use the holidays as the third argument of the Date functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using lookups or maps does not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 14:46:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65185#M10816</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-11T14:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65186#M10817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This code should do the work but, as you mention, it's a bit rough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The inherited code uses lastworkdate and networkdates a lot of time... It will be difficult to convince the managers and others developers to substitute a pair lines of code for 29...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2018 14:49:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65186#M10817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-11T14:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65187#M10818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not going to comment on code and/or issues that I haven't had the chance to review.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just keep in mind that the FOR loop and all preparations in the above example consitute a framework to which you can add all other required data manipulations. Meaning that inserting another LOAD with calls to networkdays(), lastworkdate() and/or firstworkdate() will probably increase the number of lines from 29 to 34 or something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure that you can introduce dynamic holiday list processing with just another 2 lines of script code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 09:09:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65187#M10818</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-06-12T09:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65188#M10819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FOR loop you pasted inspirated me to create dynamic variables for each country. I've made this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;//-----------------------&amp;nbsp; Dynamic creation of Holidays variables by Country --------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;ISO_CODES_TEMP:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LOAD Concat(DISTINCT chr(39) &amp;amp; ISO_CODE &amp;amp; chr(39), ', ') AS ListOfISOCodes&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;RESIDENT FACT_ORDER_DETAIL_VIEW; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LET vISOCodes = PEEK('ListOfISOCodes');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;DROP TABLE ISO_CODES_TEMP;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;FOR Each vISOCode in $(vISOCodes)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; country_holidays_tmp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD COUNTRY_HOLIDAYS AS CTR_HD_TMP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT COUNTRY_HOLIDAYS_LIST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE ISO_CODE = '$(vISOCode)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create the name of the variable dynamically&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vName = 'vHolidays_' &amp;amp; '$(vISOCode)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET '$(vName)' = PEEK('CTR_HD_TMP');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table country_holidays_tmp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vName=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;NEXT vISOCode&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And it works.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only big problem&amp;nbsp; I have now it's to call the variables dynamically. The next code does not work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LOAD PRIMARY_KEY,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(=('vHolidays_' &amp;amp; ISO_CODE)) AS HOLIDAYS_TEST,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;RESIDENT FACT_ORDER_DETAIL_VIEW&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:22:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65188#M10819</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-12T13:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65189#M10820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;LOAD PRIMARY_KEY,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; '$(vHolidays_)' &amp;amp; ISO_CODE&lt;/STRONG&gt; AS HOLIDAYS_TEST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco;"&gt;RESIDENT FACT_ORDER_DETAIL_VIEW;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 04:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65189#M10820</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-06-13T04:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65190#M10821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code, you're calling a variable called &lt;STRONG&gt;vHolidays_ &lt;/STRONG&gt;and, after getting its value, you concatenate the value of the field &lt;STRONG&gt;ISO_CODE.&lt;/STRONG&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 08:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65190#M10821</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-13T08:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65191#M10822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not look deeply within your above loop which worked like you said - I just corrected the syntax to combine the variable with the field to create another one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 08:41:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65191#M10822</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-06-13T08:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with HOLIDAYS in Date functions</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65192#M10823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for repeating myself, but you really should read this line from my earlier post &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$-sign expansion won't help either, because the expansion will be performed only once when the LOAD statement is parsed, and not row-by-row.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 22:45:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-HOLIDAYS-in-Date-functions/m-p/65192#M10823</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-06-13T22:45:02Z</dc:date>
    </item>
  </channel>
</rss>

