<?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: Generate Calendar takes a long time in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648299#M237308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks weird. Just commented the table in your loading script and added "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;25/02/2014 13:30:01&lt;/SPAN&gt;" as Min Date, "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;25/05/2014 12:11:34&lt;/SPAN&gt;" as Max Date, variables quoted with single inverted comma in loading script and it is giving me 89 rows. See below script,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//TEMP:&lt;/P&gt;&lt;P&gt;//LOAD&lt;/P&gt;&lt;P&gt;// num(min(date_create)) AS MinDate,&lt;/P&gt;&lt;P&gt;// num(max(date_create)) AS MaxDate&lt;/P&gt;&lt;P&gt;//RESIDENT Temp_Time;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = Date#('25/02/2014 13:30:01', 'DD/MM/YYYY hh:mm:ss');//peek('MinDate', 0, 'TEMP');&lt;/P&gt;&lt;P&gt;LET vMaxDate =&amp;nbsp; Date#('25/05/2014 12:11:34', 'DD/MM/YYYY hh:mm:ss');//peek('MaxDate', 0, 'TEMP');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//DROP TABLE Temp_Time;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCalendar:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; date('$(vMinDate)'+IterNo()-1) AS TempDate&lt;/P&gt;&lt;P&gt;AUTOGENERATE (1) &lt;/P&gt;&lt;P&gt;WHILE '$(vMinDate)'+IterNo()-1&amp;lt;= '$(vMaxDate)';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2014 03:34:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-06-25T03:34:51Z</dc:date>
    <item>
      <title>Generate Calendar takes a long time</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648298#M237307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to generate a calendar with my date (Min &amp;amp; Max).&lt;/P&gt;&lt;P&gt;But When I reload I see more than 12 millions of rows to generate a calendar from 25/02/2014 13:30:01 to 25/05/2014 12:11:34.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help me, please ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 02:55:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648298#M237307</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-06-25T02:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Calendar takes a long time</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648299#M237308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks weird. Just commented the table in your loading script and added "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;25/02/2014 13:30:01&lt;/SPAN&gt;" as Min Date, "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;25/05/2014 12:11:34&lt;/SPAN&gt;" as Max Date, variables quoted with single inverted comma in loading script and it is giving me 89 rows. See below script,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//TEMP:&lt;/P&gt;&lt;P&gt;//LOAD&lt;/P&gt;&lt;P&gt;// num(min(date_create)) AS MinDate,&lt;/P&gt;&lt;P&gt;// num(max(date_create)) AS MaxDate&lt;/P&gt;&lt;P&gt;//RESIDENT Temp_Time;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = Date#('25/02/2014 13:30:01', 'DD/MM/YYYY hh:mm:ss');//peek('MinDate', 0, 'TEMP');&lt;/P&gt;&lt;P&gt;LET vMaxDate =&amp;nbsp; Date#('25/05/2014 12:11:34', 'DD/MM/YYYY hh:mm:ss');//peek('MaxDate', 0, 'TEMP');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//DROP TABLE Temp_Time;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCalendar:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; date('$(vMinDate)'+IterNo()-1) AS TempDate&lt;/P&gt;&lt;P&gt;AUTOGENERATE (1) &lt;/P&gt;&lt;P&gt;WHILE '$(vMinDate)'+IterNo()-1&amp;lt;= '$(vMaxDate)';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 03:34:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648299#M237308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-25T03:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Calendar takes a long time</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648300#M237309</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;Check this thread hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="j-search-result-value" href="https://community.qlik.com/docs/DOC-3858" style="margin: 0 0 3px; font-weight: bold; font-size: 15px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;EM class="jive-hilite" style="font-family: inherit; background-color: #ffffcd;"&gt;Master&lt;/EM&gt; &lt;EM class="jive-hilite" style="font-family: inherit; background-color: #ffffcd;"&gt;Calendar&lt;/EM&gt; Generation Script&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Try this script below &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;CalendarMaster:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(TempDate) AS TempDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(TempDate) AS Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q' &amp;amp; Ceil(Month(TempDate) / 3) AS Quarter,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(TempDate) As Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(TempDate) As Day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(TempDate) As Week;&lt;/P&gt;&lt;P&gt;Load Date(MinDate + IterNo() -1 ) AS TempDate While (MinDate + IterNo() - 1) &amp;lt;= Num(MaxDate);&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Floor(min(date_create)) AS MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Floor(max(date_create)) AS MaxDate&lt;/P&gt;&lt;P&gt;RESIDENT Temp_Time;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 04:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648300#M237309</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-06-25T04:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Calendar takes a long time</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648301#M237310</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;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET varMinDate = Num(MakeDate(2008,8,31));&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET varMaxDate = Floor(MonthEnd(Today()));&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET varToday = Date(Today(), 'MM/DD/YYYY');&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET varYesterday = Date(Today()-1, 'MM/DD/YYYY');&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET varCurrentMonth = Date(Monthstart(Today()-1), 'MMM-YYYY');&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;//************************Temporary Calendar***************************&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;//Create all days in the range from varMinDate to varMaxDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;TempCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;$(varMinDate)+Iterno()-1 AS Num,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Date($(varMinDate)+Iterno()-1) AS TempDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;AUTOGENERATE 1 WHILE $(varMinDate)+Iterno()-1&amp;lt;= num(today());&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;//**************************Master Calendar******************************&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;//Building the master calendar with most date dimensions&amp;nbsp; &lt;/P&gt;&lt;P&gt;MasterCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;TempDate as InvDate,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Day(TempDate) as Day,&amp;nbsp; &lt;/P&gt;&lt;P&gt;If(WildMatch(Month(TempDate),'Jan','Feb','Mar'),Num(Month(TempDate))+9,Num(Month(TempDate))-3) as CMonth,&lt;/P&gt;&lt;P&gt;If(WildMatch(Month(TempDate),'Jan','Feb','Mar'),Year(TempDate)-1,Year(TempDate))as CYear,&lt;/P&gt;&lt;P&gt;Day(TempDate)&amp;amp;'/'&amp;amp;If(WildMatch(Month(TempDate),'Jan','Feb','Mar'),Num(Month(TempDate))+9,Num(Month(TempDate))-3)&amp;amp;'/'&amp;amp;If(WildMatch(Month(TempDate),'Jan','Feb','Mar'),Year(TempDate)-1,Year(TempDate)) as InvFinDate,&lt;/P&gt;&lt;P&gt;YearName(TempDate, 0, 4) as FinYearName,&lt;/P&gt;&lt;P&gt;Weekday(TempDate) as WeekDay,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Week(TempDate) as Week,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Month(TempDate) as Month,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Year(TempDate) as Year,&amp;nbsp; &lt;/P&gt;&lt;P&gt;MonthName(TempDate) AS MonthYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;'Q' &amp;amp; ceil(month(TempDate) / 3)&amp;nbsp; AS Quarter,&amp;nbsp; &lt;/P&gt;&lt;P&gt;'Q' &amp;amp; ceil((If(WildMatch(Month(TempDate),'Jan','Feb','Mar'),Num(Month(TempDate))+9,Num(Month(TempDate))-3)) / 3) as FinQuarter,&lt;/P&gt;&lt;P&gt;'Q' &amp;amp; ceil((If(WildMatch(Month(TempDate),'Jan','Feb','Mar'),Num(Month(TempDate))+9,Num(Month(TempDate))-3)) / 3) &amp;amp; ' '&amp;amp;If(WildMatch(Month(TempDate),'Jan','Feb','Mar'),Year(TempDate)-1,Year(TempDate)) AS QuarterYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;date(Today()-1) as Yesterday,&amp;nbsp; &lt;/P&gt;&lt;P&gt;inyeartodate(TempDate, $(varToday), 0) * -1 AS CurYTDFlag,&amp;nbsp; &lt;/P&gt;&lt;P&gt;inyeartodate(TempDate, $(varToday), -1) * -1 AS LastYTDFlag&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;resident TempCalendar&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;order by TempDate Asc;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 06:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648301#M237310</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2014-06-25T06:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Calendar takes a long time</title>
      <link>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648302#M237311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you,so much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 18:52:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Generate-Calendar-takes-a-long-time/m-p/648302#M237311</guid>
      <dc:creator>suzel404</dc:creator>
      <dc:date>2014-06-25T18:52:10Z</dc:date>
    </item>
  </channel>
</rss>

