<?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 Error message on Calendar script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611750#M735305</link>
    <description>Good day I have calendar code below running successfully on Qlikview however when I take the same code and paste it on QlikSense it gives me the error message below. Any idea what is causing the error message ? The following error occurred: Autogenerate: generate count is out of range The error occurred here: LOAD Date( + RangeSum(Peek('RowNum'), 1) - 1) AS Date, RangeSum(Peek('RowNum'), 1) AS RowNum AutoGenerate vEndDate - vStartDate + 1</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>skzwane01</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Error message on Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611750#M735305</link>
      <description>Good day I have calendar code below running successfully on Qlikview however when I take the same code and paste it on QlikSense it gives me the error message below. Any idea what is causing the error message ? The following error occurred: Autogenerate: generate count is out of range The error occurred here: LOAD Date( + RangeSum(Peek('RowNum'), 1) - 1) AS Date, RangeSum(Peek('RowNum'), 1) AS RowNum AutoGenerate vEndDate - vStartDate + 1</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611750#M735305</guid>
      <dc:creator>skzwane01</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error message on Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611758#M735306</link>
      <description>&lt;P&gt;debug and check what the value of these variables are&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;vEndDate , vStartDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;share the actual script so we can help further&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 19:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611758#M735306</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-08-12T19:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error message on Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611760#M735307</link>
      <description>&lt;P&gt;There is most likely an issue with your variables.&lt;/P&gt;&lt;P&gt;How is&amp;nbsp;&lt;STRONG&gt;vEndDate&lt;/STRONG&gt; and&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;vStartDate&lt;/STRONG&gt; defined?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on your scenario, it might help to dollar expand your variables.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOAD 
  Date( + RangeSum(Peek('RowNum'), 1) - 1) AS Date, RangeSum(Peek('RowNum'), 1) AS RowNum 
AutoGenerate $(vEndDate) - $(vStartDate) + 1
;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 19:52:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611760#M735307</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-08-12T19:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error message on Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611762#M735308</link>
      <description>&lt;P&gt;Hi please copy below script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note the variables have a hardcoded value&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=================================================&lt;/P&gt;&lt;P&gt;SET vFiscalYearStartMonth = 3;&lt;/P&gt;&lt;P&gt;LET vStartDate = Num(Date(Date#('13/01/2011')));&lt;/P&gt;&lt;P&gt;LET vEndDate = Num(Date(Date#('17/10/2012')));&lt;/P&gt;&lt;P&gt;FiscalCalendar:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;Dual('Q' &amp;amp; Ceil(FiscalMonth/3), Ceil(FiscalMonth/3)) AS FiscalQuarter, // Fiscal Calendar Quarter&lt;/P&gt;&lt;P&gt;Dual(Text(Date(MonthEnd(Date), 'MMM')), FiscalMonth) AS FiscalMonthName; // Fiscal Calendar Month Name&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;Year(Date) AS Year, // Standard Calendar Year&lt;/P&gt;&lt;P&gt;Month(Date) AS Month, // Standard Calendar Month&lt;/P&gt;&lt;P&gt;Date(MonthEnd(Date), 'MMM') AS MonthName, // Standard Calendar Month Name&lt;/P&gt;&lt;P&gt;Dual('Q' &amp;amp; Ceil(Month(Date)/3), Ceil(Month(Date)/3)) AS Quarter, // Standard Calendar Quarter&lt;/P&gt;&lt;P&gt;Mod(Month(Date) - $(vFiscalYearStartMonth), 12)+1 AS FiscalMonth, // Fiscal Calendar Month&lt;/P&gt;&lt;P&gt;YearName(Date, 0, $(vFiscalYearStartMonth)) AS FiscalYear; // Fiscal Calendar Year&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Date($(vStartDate) + RangeSum(Peek('RowNum'), 1) - 1) AS Date,&lt;/P&gt;&lt;P&gt;RangeSum(Peek('RowNum'), 1) AS RowNum&lt;/P&gt;&lt;P&gt;AutoGenerate vEndDate - vStartDate + 1;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 19:56:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611762#M735308</guid>
      <dc:creator>skzwane01</dc:creator>
      <dc:date>2019-08-12T19:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error message on Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611763#M735309</link>
      <description>&lt;P&gt;Please see below script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SET vFiscalYearStartMonth = 3;&lt;/P&gt;&lt;P&gt;LET vStartDate = Num(Date(Date#('13/01/2011')));&lt;/P&gt;&lt;P&gt;LET vEndDate = Num(Date(Date#('17/10/2012')));&lt;/P&gt;&lt;P&gt;FiscalCalendar:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;Dual('Q' &amp;amp; Ceil(FiscalMonth/3), Ceil(FiscalMonth/3)) AS FiscalQuarter, // Fiscal Calendar Quarter&lt;/P&gt;&lt;P&gt;Dual(Text(Date(MonthEnd(Date), 'MMM')), FiscalMonth) AS FiscalMonthName; // Fiscal Calendar Month Name&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;Year(Date) AS Year, // Standard Calendar Year&lt;/P&gt;&lt;P&gt;Month(Date) AS Month, // Standard Calendar Month&lt;/P&gt;&lt;P&gt;Date(MonthEnd(Date), 'MMM') AS MonthName, // Standard Calendar Month Name&lt;/P&gt;&lt;P&gt;Dual('Q' &amp;amp; Ceil(Month(Date)/3), Ceil(Month(Date)/3)) AS Quarter, // Standard Calendar Quarter&lt;/P&gt;&lt;P&gt;Mod(Month(Date) - $(vFiscalYearStartMonth), 12)+1 AS FiscalMonth, // Fiscal Calendar Month&lt;/P&gt;&lt;P&gt;YearName(Date, 0, $(vFiscalYearStartMonth)) AS FiscalYear; // Fiscal Calendar Year&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Date($(vStartDate) + RangeSum(Peek('RowNum'), 1) - 1) AS Date,&lt;/P&gt;&lt;P&gt;RangeSum(Peek('RowNum'), 1) AS RowNum&lt;/P&gt;&lt;P&gt;AutoGenerate vEndDate - vStartDate + 1;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 20:00:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611763#M735309</guid>
      <dc:creator>skzwane01</dc:creator>
      <dc:date>2019-08-12T20:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error message on Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611764#M735312</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;SET vFiscalYearStartMonth = 3;
LET vStartDate = Num(Date(Date#('13/01/2011','DD/MM/YYYY')));
LET vEndDate = Num(Date(Date#('17/10/2012','DD/MM/YYYY')));

FiscalCalendar:
LOAD [...];
LOAD [...];
LOAD
Date($(vStartDate) + RangeSum(Peek('RowNum'), 1) - 1) AS Date,
RangeSum(Peek('RowNum'), 1) AS RowNum
AutoGenerate vEndDate - vStartDate + 1;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My guess is that you have another&amp;nbsp; DateFormat than what you are assuming in your script. (DD/MM/YYYY). I adjusted the script to explicit set the DateFormat used in the declaration of your variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 20:05:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611764#M735312</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-08-12T20:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error message on Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611765#M735316</link>
      <description>&lt;P&gt;change your variable definition in script to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LET vStartDate = Num(Date(Date#('13/01/2011','DD/MM/YYYY')));&lt;/P&gt;&lt;P&gt;LET vEndDate = Num(Date(Date#('17/10/2012','DD/MM/YYYY')));&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 20:01:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611765#M735316</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-08-12T20:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error message on Calendar script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611767#M735318</link>
      <description>&lt;P&gt;Thank you it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 20:10:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-message-on-Calendar-script/m-p/1611767#M735318</guid>
      <dc:creator>skzwane01</dc:creator>
      <dc:date>2019-08-12T20:10:37Z</dc:date>
    </item>
  </channel>
</rss>

