<?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 Load holiday list into variable in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831807#M292698</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;in order to use the below function I would like to load a list of holidays into a variable.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;FirstWorkDate&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;(Today(), 1, $(vMyHolidays))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Im stuck. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Any ideas? &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Attaching example data and QV-doc.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//O &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2015 09:56:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-27T09:56:13Z</dc:date>
    <item>
      <title>Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831807#M292698</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;in order to use the below function I would like to load a list of holidays into a variable.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;FirstWorkDate&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;(Today(), 1, $(vMyHolidays))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Im stuck. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Any ideas? &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Attaching example data and QV-doc.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//O &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 09:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831807#M292698</guid>
      <dc:creator />
      <dc:date>2015-04-27T09:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831808#M292699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Olle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are trying to get the start days for all the holidays, you should be using a for loop so that all the holiday values will be included. If this is not clear, please explain more about the final output you are interested in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 10:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831808#M292699</guid>
      <dc:creator>NareshGuntur</dc:creator>
      <dc:date>2015-04-27T10:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831809#M292700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try defining your variable like:&lt;/P&gt;&lt;P&gt;=Chr(39)&amp;amp;Concat(Holidays,chr(39)&amp;amp;','&amp;amp;chr(39))&amp;amp;chr(39)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the fornt-end&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 10:22:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831809#M292700</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-04-27T10:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831810#M292701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add this in the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;vMyHolidays &lt;/EM&gt;&lt;/STRONG&gt;= "max(Holiday)";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where Holiday is the name of the field which contains the list of holidays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 10:27:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831810#M292701</guid>
      <dc:creator>NareshGuntur</dc:creator>
      <dc:date>2015-04-27T10:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831811#M292702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstWorkDate(Today(), 1, Chr(39) &amp;amp; Concat(Holidays, Chr(39)&amp;amp;','&amp;amp;Chr(39))&amp;amp;Chr(39))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 10:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831811#M292702</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-04-27T10:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831812#M292703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try loading your master calendar like this : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//******* Holiday********&lt;/P&gt;&lt;P&gt;tblHoliday:&lt;/P&gt;&lt;P&gt;LOAD Date(Holiday) as Holiday;&lt;/P&gt;&lt;P&gt;SQL SELECT Holiday&lt;/P&gt;&lt;P&gt;FROM table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/************** varHoliday **************/&lt;/P&gt;&lt;P&gt;tmpTbl:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;LOAD Concat(Holiday,',') as fieldHoliday&lt;/P&gt;&lt;P&gt;Resident tblHoliday;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET varHoliday = Peek('fieldHoliday',0,'tmpTbl');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table tmpTbl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Script One&lt;/P&gt;&lt;P&gt;Let varMinDate = num(MakeDate(2000,1,1));&lt;/P&gt;&lt;P&gt;Let varMaxDate = num(MakeDate(2020,12,31));&lt;/P&gt;&lt;P&gt;//*************** Temporary Calendar ***************&lt;/P&gt;&lt;P&gt;TempCalendar:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(varMinDate) + rowno() - 1 AS Num, &lt;/P&gt;&lt;P&gt;&amp;nbsp; date($(varMinDate) + rowno() - 1) AS TempDate &lt;/P&gt;&lt;P&gt;AUTOGENERATE &lt;/P&gt;&lt;P&gt;&amp;nbsp; $(varMaxDate) - $(varMinDate) + 1; &lt;/P&gt;&lt;P&gt;//*************** Master Calendar ***************&lt;/P&gt;&lt;P&gt;MasterCalendar:&lt;/P&gt;&lt;P&gt;LOAD TempDate AS CalDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date(TempDate) AS CalanderDate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(weekday(TempDate)='Sat' or weekday(TempDate)='Sun' or If(substringcount('$(varHoliday)',Date(TempDate))&amp;gt;0,1,0),0,1) as HolidayFlag&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1 As PlannedBD,&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;resident TempCalendar&lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use holidayflag to check if it is holiday or not in your calculation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831812#M292703</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-27T11:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831813#M292704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85121_Capture.JPG" style="height: auto;" /&gt;@Jagan and Naresh,&lt;/P&gt;&lt;P&gt;tried to implement your suggested solutions but holidays are still not calculated for &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;For instance, for "Date"m 2-jan, prev date should be 30-Dec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831813#M292704</guid>
      <dc:creator />
      <dc:date>2015-04-27T11:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831814#M292705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class="replyToName"&gt;balkumarchandel.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Im calling an add in kind of master calendar for all of my apps so your solution is not appropriate for me im afraid.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Thanks though!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:27:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831814#M292705</guid>
      <dc:creator />
      <dc:date>2015-04-27T11:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831815#M292706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Date 02-Jan-15, there's no holiday associated. So, it doesn't consider 01-Jan-15 as a holiday&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 12:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831815#M292706</guid>
      <dc:creator>NareshGuntur</dc:creator>
      <dc:date>2015-04-27T12:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831816#M292707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, my bad!&lt;/P&gt;&lt;P&gt;Now it should be updated accordingly.&lt;/P&gt;&lt;P&gt;But still no change as far as I can see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Olle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 12:15:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831816#M292707</guid>
      <dc:creator />
      <dc:date>2015-04-27T12:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831817#M292708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this could help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-5741"&gt;Calculating Holidays in script&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 12:17:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831817#M292708</guid>
      <dc:creator />
      <dc:date>2015-04-27T12:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831818#M292709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;01-Jan still is not labeled as holiday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this dashboard. Working fine if 01-Jan is declared in holiday list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Naresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 12:24:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831818#M292709</guid>
      <dc:creator>NareshGuntur</dc:creator>
      <dc:date>2015-04-27T12:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Load holiday list into variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831819#M292710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, but pls see below. Then for date 2-jan, the answer should be 30-dec 2014 right?&lt;/P&gt;&lt;P&gt;Now it says 31-dec-2014 even though it is also declared as a holiday in the list.&lt;/P&gt;&lt;P&gt;Do you know why?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85123_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 12:31:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-holiday-list-into-variable-in-script/m-p/831819#M292710</guid>
      <dc:creator />
      <dc:date>2015-04-27T12:31:50Z</dc:date>
    </item>
  </channel>
</rss>

