<?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 Master Calendar in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Master-Calendar/m-p/1131442#M914676</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 have the following script to create the master calendar and rolling data. Noticed that the date on the As Of Table is out by a day i.e first RecordDate AsOf comes out as 20/07/2011 instead of 21/07/2011 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125522_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/125523_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other problem I have is that the running total does not seem to work in certain parts of the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/125528_pastedImage_3.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure where I am going wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate your assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load min(RecordDate) as MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(RecordDate) as MaxDate&lt;/P&gt;&lt;P&gt;Resident HISTORY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMinDate =Num( peek('MinDate',0,'Temp'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMaxDate =Num( peek('MaxDate',0,'Temp'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vToday=$(vMaxDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCal:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;date($(vMinDate)+RowNo()-1) AS TempDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AutoGenerate&lt;/P&gt;&lt;P&gt;$(vMaxDate)-$(vMinDate)+1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MasterCalendar:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;TempDate AS RecordDate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(AddMonths(Date([TempDate]),6)) as FiscalRecordYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Date([TempDate])) as RecordYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(Date([TempDate])) as RecordMonth,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName(Date([TempDate])) as RecordMonthYr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q' &amp;amp; (mod(Ceil(Month(Date([TempDate]))/3)+1,4)+1) as RecordQuarter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT TempCal&lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE TempCal;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AsOfMonth:&lt;/P&gt;&lt;P&gt;load 'Current' as Type,&lt;/P&gt;&lt;P&gt;RecordDate as RecordDate_AsOf,&lt;/P&gt;&lt;P&gt;RecordDate&lt;/P&gt;&lt;P&gt;Resident MasterCalendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;right join load RecordDate &lt;/P&gt;&lt;P&gt;Resident MasterCalendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shamit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>shamitshah</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Master Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Master-Calendar/m-p/1131442#M914676</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 have the following script to create the master calendar and rolling data. Noticed that the date on the As Of Table is out by a day i.e first RecordDate AsOf comes out as 20/07/2011 instead of 21/07/2011 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125522_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/125523_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other problem I have is that the running total does not seem to work in certain parts of the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/125528_pastedImage_3.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure where I am going wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate your assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load min(RecordDate) as MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(RecordDate) as MaxDate&lt;/P&gt;&lt;P&gt;Resident HISTORY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMinDate =Num( peek('MinDate',0,'Temp'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMaxDate =Num( peek('MaxDate',0,'Temp'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vToday=$(vMaxDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCal:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;date($(vMinDate)+RowNo()-1) AS TempDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AutoGenerate&lt;/P&gt;&lt;P&gt;$(vMaxDate)-$(vMinDate)+1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MasterCalendar:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;TempDate AS RecordDate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(AddMonths(Date([TempDate]),6)) as FiscalRecordYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Date([TempDate])) as RecordYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(Date([TempDate])) as RecordMonth,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName(Date([TempDate])) as RecordMonthYr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q' &amp;amp; (mod(Ceil(Month(Date([TempDate]))/3)+1,4)+1) as RecordQuarter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT TempCal&lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE TempCal;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AsOfMonth:&lt;/P&gt;&lt;P&gt;load 'Current' as Type,&lt;/P&gt;&lt;P&gt;RecordDate as RecordDate_AsOf,&lt;/P&gt;&lt;P&gt;RecordDate&lt;/P&gt;&lt;P&gt;Resident MasterCalendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;right join load RecordDate &lt;/P&gt;&lt;P&gt;Resident MasterCalendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shamit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Master-Calendar/m-p/1131442#M914676</guid>
      <dc:creator>shamitshah</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Master Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/Master-Calendar/m-p/1131443#M914677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at this blog post:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Henric is doing a cartesian product between AsOf Date field and the field of the master calendar, then filter the AsOf table to only relations where AsOf date &amp;gt;= master calendar date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your script code, you are missing the cartesian product (and not sure if you want to filter or not).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest that your try to keep to Henric's blog.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 09:07:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Master-Calendar/m-p/1131443#M914677</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-24T09:07:52Z</dc:date>
    </item>
  </channel>
</rss>

