<?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 4 4 5 Calendar in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/4-4-5-Calendar/m-p/201510#M59567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello group, I need your help. We are on a 4-4-5 fiscal calendar, where part of Jan 2010 rolls into Dec 2009. My problem is with my YTD numbers not rolling up correctly. Here is my script if anyone can help great. My YTDFlag is only for Jan 2010 and should be for 2009.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;CurrentDate:&lt;BR /&gt;LOAD FISPD,&lt;BR /&gt; FISYR,&lt;BR /&gt; [Billing Date],&lt;BR /&gt; WEDAT,&lt;BR /&gt; WKNO&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt;where [Billing Date] = '$(vToday)';&lt;/D&gt;&lt;/P&gt;&lt;P&gt;LET vFisYr = peek('FISYR', 0, 'CurrentDate');&lt;BR /&gt;LET vFisPd = peek('FISPD', 0, 'CurrentDate');&lt;BR /&gt;LET vWkNo = peek('WKNO', 0, 'CurrentDate');&lt;/P&gt;&lt;P&gt;DROP TABLE CurrentDate;&lt;/P&gt;&lt;P&gt;FiscalCalendar:&lt;BR /&gt;LOAD FISPD,&lt;BR /&gt; FISYR,&lt;BR /&gt; [Billing Date],&lt;BR /&gt; WEDAT,&lt;BR /&gt; WKNO,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vToday)' AND FISPD &amp;lt;= '$(vFisPd)' AND WKNO &amp;lt;= '$(vWkNo)', 1) AS YTDFlag,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vToday)' AND FISPD = '$(vFisPd)', 1) AS MTDFlag,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vPrevToday)' AND [Billing Date] &amp;gt;= '$(vRolling4)', 1) AS RTD4Flag,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vToday)' AND [Billing Date] &amp;gt;= '$(vRolling3)', 1) AS RTD3Flag&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt;where FISYR &amp;gt;= '$(vPrevYear)' and FISYR &amp;lt; '$(vYear)';&lt;/D&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jan 2010 17:10:21 GMT</pubDate>
    <dc:creator>tmumaw</dc:creator>
    <dc:date>2010-01-05T17:10:21Z</dc:date>
    <item>
      <title>4 4 5 Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/4-4-5-Calendar/m-p/201510#M59567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello group, I need your help. We are on a 4-4-5 fiscal calendar, where part of Jan 2010 rolls into Dec 2009. My problem is with my YTD numbers not rolling up correctly. Here is my script if anyone can help great. My YTDFlag is only for Jan 2010 and should be for 2009.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;CurrentDate:&lt;BR /&gt;LOAD FISPD,&lt;BR /&gt; FISYR,&lt;BR /&gt; [Billing Date],&lt;BR /&gt; WEDAT,&lt;BR /&gt; WKNO&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt;where [Billing Date] = '$(vToday)';&lt;/D&gt;&lt;/P&gt;&lt;P&gt;LET vFisYr = peek('FISYR', 0, 'CurrentDate');&lt;BR /&gt;LET vFisPd = peek('FISPD', 0, 'CurrentDate');&lt;BR /&gt;LET vWkNo = peek('WKNO', 0, 'CurrentDate');&lt;/P&gt;&lt;P&gt;DROP TABLE CurrentDate;&lt;/P&gt;&lt;P&gt;FiscalCalendar:&lt;BR /&gt;LOAD FISPD,&lt;BR /&gt; FISYR,&lt;BR /&gt; [Billing Date],&lt;BR /&gt; WEDAT,&lt;BR /&gt; WKNO,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vToday)' AND FISPD &amp;lt;= '$(vFisPd)' AND WKNO &amp;lt;= '$(vWkNo)', 1) AS YTDFlag,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vToday)' AND FISPD = '$(vFisPd)', 1) AS MTDFlag,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vPrevToday)' AND [Billing Date] &amp;gt;= '$(vRolling4)', 1) AS RTD4Flag,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vToday)' AND [Billing Date] &amp;gt;= '$(vRolling3)', 1) AS RTD3Flag&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt;where FISYR &amp;gt;= '$(vPrevYear)' and FISYR &amp;lt; '$(vYear)';&lt;/D&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 17:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/4-4-5-Calendar/m-p/201510#M59567</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2010-01-05T17:10:21Z</dc:date>
    </item>
    <item>
      <title>4 4 5 Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/4-4-5-Calendar/m-p/201511#M59568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;See if this file is of any help to you:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/media/p/71215.aspx"&gt;http://community.qlik.com/media/p/71215.aspx&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 17:30:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/4-4-5-Calendar/m-p/201511#M59568</guid>
      <dc:creator />
      <dc:date>2010-01-05T17:30:33Z</dc:date>
    </item>
    <item>
      <title>4 4 5 Calendar</title>
      <link>https://community.qlik.com/t5/QlikView/4-4-5-Calendar/m-p/201512#M59569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Little confused on how I would use the dateisland. I already have a table from SAP which contains my Billing Date, Fiscal Year, Fiscal Period. I think my main problem is setting my YTD and MTD flags based on the calendar.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Thom&lt;/P&gt;&lt;P&gt;CurrentDate:&lt;BR /&gt;LOAD FISPD,&lt;BR /&gt; FISYR,&lt;BR /&gt; [Billing Date],&lt;BR /&gt; WEDAT,&lt;BR /&gt; WKNO&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt;where [Billing Date] = '$(vToday)';&lt;/D&gt;&lt;/P&gt;&lt;P&gt;LET vFisYr = peek('FISYR', 0, 'CurrentDate');&lt;BR /&gt;LET vFisPd = peek('FISPD', 0, 'CurrentDate');&lt;BR /&gt;LET vWkNo = peek('WKNO', 0, 'CurrentDate');&lt;/P&gt;&lt;P&gt;DROP TABLE CurrentDate;&lt;/P&gt;&lt;P&gt;FiscalCalendar:&lt;BR /&gt;LOAD FISPD,&lt;BR /&gt; FISYR,&lt;BR /&gt; [Billing Date],&lt;BR /&gt; WEDAT,&lt;BR /&gt; WKNO,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vToday)' AND FISPD &amp;lt;= '$(vFisPd)' AND WKNO &amp;lt;= '$(vWkNo)', 1) AS YTDFlag,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vToday)' AND FISPD = '$(vFisPd)', 1) AS MTDFlag,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vPrevToday)' AND [Billing Date] &amp;gt;= '$(vRolling4)', 1) AS RTD4Flag,&lt;BR /&gt; if([Billing Date] &amp;lt;= '$(vToday)' AND [Billing Date] &amp;gt;= '$(vRolling3)', 1) AS RTD3Flag&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt;where FISYR &amp;gt;= '$(vPrevYear)' and FISYR &amp;lt; '$(vYear)';&lt;/D&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 17:56:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/4-4-5-Calendar/m-p/201512#M59569</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2010-01-05T17:56:34Z</dc:date>
    </item>
  </channel>
</rss>

