<?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: Calendar script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390634#M699007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's usually better to start a discussion with a specific question, instead of "please explain QlikView scripting".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3 PRECEDING LOADs and one LOAD AUTOGENERATE to create single table CALENDAR&lt;/P&gt;&lt;P&gt;Each PRECEDING LOAD takes its data from the next line (by way of RESIDENT tables)&lt;/P&gt;&lt;P&gt;Read the script in reverse:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;LOAD 4: Generate a fixed set of 2000 dates somewhere in the future&lt;/LI&gt;&lt;LI&gt;LOAD 3: Calculate and add MonthStart, YearStart, Month and Year values to each date field&lt;/LI&gt;&lt;LI&gt;LOAD 2: Add various intermediate values while calculating a "Quarter" value for each date&lt;/LI&gt;&lt;LI&gt;LOAD 1: Add a dual (e.g. text and number) Quarter field to each date&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Nov 2012 11:30:46 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2012-11-29T11:30:46Z</dc:date>
    <item>
      <title>Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390632#M699005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;[Calendar]:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;,dual('Q' &amp;amp; "Quarter Only" &amp;amp; ' ' &amp;amp; "Year Only",quarterstart("Date")) as "Quarter"&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;,"Month Only"/3 as "Quarter Only_testing","Month Only" as "Quarter Only_testing1",&lt;/P&gt;&lt;P&gt;ceil("Month Only"/3) as "Quarter Only_test",&lt;/P&gt;&lt;P&gt;'Q'&amp;amp;ceil("Month Only"/3) as "Quarter Only"&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;,date(monthstart("Date"),'MMM YYYY') as "Month"&lt;/P&gt;&lt;P&gt;,date(yearstart("Date"),'YYYY') as "Year"&lt;/P&gt;&lt;P&gt;,month("Date") as "Month Only"&lt;/P&gt;&lt;P&gt;,year("Date") as "Year Only"&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD date(today() + 10000 - recno()) as Date&lt;/P&gt;&lt;P&gt;AUTOGENERATE 2000&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;Can you pls any one explain me about this script.&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, 29 Nov 2012 10:40:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390632#M699005</guid>
      <dc:creator />
      <dc:date>2012-11-29T10:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390633#M699006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u will read about this either through in refrence manual or in qlikview help.. and it must be clear from that. &lt;/P&gt;&lt;P&gt;hope this help....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 11:13:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390633#M699006</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2012-11-29T11:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390634#M699007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's usually better to start a discussion with a specific question, instead of "please explain QlikView scripting".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3 PRECEDING LOADs and one LOAD AUTOGENERATE to create single table CALENDAR&lt;/P&gt;&lt;P&gt;Each PRECEDING LOAD takes its data from the next line (by way of RESIDENT tables)&lt;/P&gt;&lt;P&gt;Read the script in reverse:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;LOAD 4: Generate a fixed set of 2000 dates somewhere in the future&lt;/LI&gt;&lt;LI&gt;LOAD 3: Calculate and add MonthStart, YearStart, Month and Year values to each date field&lt;/LI&gt;&lt;LI&gt;LOAD 2: Add various intermediate values while calculating a "Quarter" value for each date&lt;/LI&gt;&lt;LI&gt;LOAD 1: Add a dual (e.g. text and number) Quarter field to each date&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 11:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390634#M699007</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2012-11-29T11:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390635#M699008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand, but I didn't get this line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD date(today() + 10000 - recno()) as Date&lt;/P&gt;&lt;P&gt;AUTOGENERATE 2000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you pls explain.&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, 29 Nov 2012 11:35:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390635#M699008</guid>
      <dc:creator />
      <dc:date>2012-11-29T11:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390636#M699009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That line generates 2000 records numbered from 1 to 2000. RecNo() returns the number of the record that is currently being generated. This value is subtracted from &lt;EM&gt;today()+10000&lt;/EM&gt; e.g. 10000 days in the future. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the first record has a date of today() + 9999 days, the second today() + 9998 days etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 11:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390636#M699009</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2012-11-29T11:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390637#M699010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree Peter, will do next time onwards.&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, 29 Nov 2012 11:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-script/m-p/390637#M699010</guid>
      <dc:creator />
      <dc:date>2012-11-29T11:53:41Z</dc:date>
    </item>
  </channel>
</rss>

