<?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: How this script works for creating period ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-this-script-works-for-creating-period/m-p/1200421#M386651</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't understand the code or is there a problem in the code you are trying to resolve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2016 11:19:16 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-04T11:19:16Z</dc:date>
    <item>
      <title>How this script works for creating period ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-script-works-for-creating-period/m-p/1200420#M386650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can somebody help me in understanding the below code . I am completely fed up after trying so many times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #99cc00;"&gt;// Add Period1 field to be able to associate with the AsOf table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;REV:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt; MonthStart(Date(Date(Date#(MonthYear,'MMM-YYYY'),'DD-MM-YYYY'),'YYYYMM')) as Period1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName(MonthNo) as Month&lt;/P&gt;&lt;P&gt;From REV.qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #99cc00;"&gt;// Temporary table with list of Period values&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;PeriodTbl:&lt;/P&gt;&lt;P&gt;LOAD date(fieldvalue('Period1',recno()),'YYYYMM') as Period&lt;/P&gt;&lt;P&gt;AUTOGENERATE fieldvaluecount('Period1');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #99cc00;"&gt;AsOf:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #99cc00;"&gt;//Load every month as current month into AsOf table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt; Period as AsOfPeriod&lt;/P&gt;&lt;P&gt;,'Current' as PeriodType&lt;/P&gt;&lt;P&gt;,Period as Period1&lt;/P&gt;&lt;P&gt; ,Year(Period) as Year&lt;/P&gt;&lt;P&gt;RESIDENT PeriodTbl;&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;CONCATENATE (AsOf)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #99cc00;"&gt;//Load Rolling 3 into AsOf table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt; Period as AsOf&lt;/P&gt;&lt;P&gt;,'Rolling 3' as PeriodType&lt;/P&gt;&lt;P&gt;,date(addmonths(Period,1-iterno()),'YYYYMM') as Period1&lt;/P&gt;&lt;P&gt; ,Year(Period) as Year&lt;/P&gt;&lt;P&gt;RESIDENT PeriodTbl&lt;/P&gt;&lt;P&gt;WHILE iterno() &amp;lt;= 3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE (AsOf)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #99cc00;"&gt;//Load Rolling 6 into AsOf table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt; Period as AsOf&lt;/P&gt;&lt;P&gt;,'Rolling 6' as PeriodType&lt;/P&gt;&lt;P&gt;,date(addmonths(Period,1-iterno()),'YYYYMM') as Period1&lt;/P&gt;&lt;P&gt; ,Year(Period) as Year&lt;/P&gt;&lt;P&gt;RESIDENT PeriodTbl&lt;/P&gt;&lt;P&gt;WHILE iterno() &amp;lt;= 6;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE (AsOf)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #99cc00;"&gt;//Load Rolling 12 into AsOf table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt; Period as AsOf&lt;/P&gt;&lt;P&gt;,'Rolling 12' as PeriodType&lt;/P&gt;&lt;P&gt;,date(addmonths(Period,1-iterno()),'YYYYMM') as Period1&lt;/P&gt;&lt;P&gt; ,Year(Period) as Year&lt;/P&gt;&lt;P&gt;RESIDENT PeriodTbl&lt;/P&gt;&lt;P&gt;WHILE iterno() &amp;lt;= 12;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE (AsOf)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #99cc00;"&gt;//Load YTD into AsOf table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt; Period as AsOf&lt;/P&gt;&lt;P&gt;,'YTD' as PeriodType&lt;/P&gt;&lt;P&gt;,date(addmonths(Period,1-iterno()),'YYYYMM') as Period1&lt;/P&gt;&lt;P&gt; ,Year(Period) as Year&lt;/P&gt;&lt;P&gt;RESIDENT PeriodTbl&lt;/P&gt;&lt;P&gt;WHILE iterno() &amp;lt;= num(month(Period));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN (AsOf)&lt;/P&gt;&lt;P&gt;LOAD Period as Period1&lt;/P&gt;&lt;P&gt;RESIDENT PeriodTbl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE PeriodTbl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 11:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-script-works-for-creating-period/m-p/1200420#M386650</guid>
      <dc:creator />
      <dc:date>2016-10-04T11:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: How this script works for creating period ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-script-works-for-creating-period/m-p/1200421#M386651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't understand the code or is there a problem in the code you are trying to resolve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 11:19:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-script-works-for-creating-period/m-p/1200421#M386651</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-04T11:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: How this script works for creating period ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-script-works-for-creating-period/m-p/1200422#M386652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Read this:&lt;/P&gt;&lt;P&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 11:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-script-works-for-creating-period/m-p/1200422#M386652</guid>
      <dc:creator>fvelascog72</dc:creator>
      <dc:date>2016-10-04T11:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: How this script works for creating period ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-this-script-works-for-creating-period/m-p/1200423#M386653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not able to understand the code and how this will generate the table. Like what will be the sample data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2016 11:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-this-script-works-for-creating-period/m-p/1200423#M386653</guid>
      <dc:creator />
      <dc:date>2016-10-04T11:22:26Z</dc:date>
    </item>
  </channel>
</rss>

