<?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: Calculating Next Business Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326452#M410289</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated!&lt;/P&gt;&lt;P&gt;Sorry for being ignorant..&lt;/P&gt;&lt;P&gt;But I'm not sure how it is linked to the holidays..&lt;/P&gt;&lt;P&gt;As looks like this script doesn't take them into account..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 May 2017 13:45:45 GMT</pubDate>
    <dc:creator>dafnis14</dc:creator>
    <dc:date>2017-05-11T13:45:45Z</dc:date>
    <item>
      <title>Calculating Next Business Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326446#M410283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have seen quite a few discussions about the topic, but seems I need a different solution..&lt;/P&gt;&lt;P&gt;I have created a list of Notworking days (including Fridays &amp;amp; Saturdays ).&lt;/P&gt;&lt;P&gt;To each date, I would like to join its next business date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a mapping table with the &lt;SPAN style="font-size: 13.3333px;"&gt;business&lt;/SPAN&gt; days. &lt;/P&gt;&lt;P&gt;and then a loop to generate &lt;SPAN style="font-size: 13.3333px;"&gt;dates&lt;/SPAN&gt;&amp;nbsp; for each not working date,&amp;nbsp; until the next business date is found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script is:&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Map_BussiDate:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Mapping&lt;/SPAN&gt; &lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;CalendDate&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Map_BussiDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Flag_Bussi_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; Calend&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Where&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Flag_BusinessDay&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; =1; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;NextBusiidate:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;HoliDate&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;NewHolidate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;HoliDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;())&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;NextBussiDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;ApplyMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('Map_BussiDate', &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;HoliDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;()),0) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Flag_Bussi_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; SpecialDays&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;While&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;ApplyMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('Map_BussiDate', &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;HoliDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;()),0)=0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;But the loop stops without applying the mapped business date..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Can someone help me?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 10:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326446#M410283</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-11T10:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Next Business Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326447#M410284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would calculate the next business date, something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LastWorkDate(HoliDate+1, 1, $(ListOfHolidays) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the HELP for more information about LastWorkDate(). ListOfHolidays is a variable containing the holidays, comma separated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 10:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326447#M410284</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-11T10:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Next Business Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326448#M410285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Weekends are Fridays &amp;amp; Saturdays. &lt;/P&gt;&lt;P&gt;There are holidays which run on consecutive dates. &lt;/P&gt;&lt;P&gt;Is this function suitable for such cases?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 10:52:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326448#M410285</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-11T10:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Next Business Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326449#M410286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this might help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/52595"&gt;Week Start - Sunday instead of Monday&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 11:44:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326449#M410286</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-05-11T11:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Next Business Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326450#M410287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked for me only after adding the weekend dates to the ListOfHoliday string.&lt;/P&gt;&lt;P&gt;Not sure if this is the only way to achieve it when you have Sunday-Thursday as working days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 11:50:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326450#M410287</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-11T11:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Next Business Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326451#M410288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&lt;/P&gt;&lt;P&gt;LOAD *, Rangesum(WorkingdayFlag, Peek(WorkingdayCounter)) as WorkingdayCounter;&lt;/P&gt;&lt;P&gt;LOAD *, Weekday(Date) as Weekdate, if(Weekday(Date) &amp;lt;4 or Weekday(Date)&amp;gt;5,1,0) as WorkingdayFlag;&lt;/P&gt;&lt;P&gt;LOAD Date(Makedate(2017)+Recno()-1) as Date&lt;/P&gt;&lt;P&gt;AutoGenerate 100;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN&lt;/P&gt;&lt;P&gt;LOAD Minstring(Date) as NextWorkingDate, WorkingdayCounter-1 as WorkingdayCounter&lt;/P&gt;&lt;P&gt;Resident Calendar Group by WorkingdayCounter;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 11:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326451#M410288</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-11T11:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Next Business Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326452#M410289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated!&lt;/P&gt;&lt;P&gt;Sorry for being ignorant..&lt;/P&gt;&lt;P&gt;But I'm not sure how it is linked to the holidays..&lt;/P&gt;&lt;P&gt;As looks like this script doesn't take them into account..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 13:45:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326452#M410289</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-11T13:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Next Business Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326453#M410290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as you create a table with a WorkingdayFlag, this should work.&lt;/P&gt;&lt;P&gt;As I understood your post, that's what you already have done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The WorkingdayFlag should show zero for holidays.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 14:18:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326453#M410290</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-05-11T14:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Next Business Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326454#M410291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2017 16:47:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Next-Business-Date/m-p/1326454#M410291</guid>
      <dc:creator>dafnis14</dc:creator>
      <dc:date>2017-05-11T16:47:46Z</dc:date>
    </item>
  </channel>
</rss>

