<?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: Distinct Month Begin and End in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405771#M150989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried that it it still loads 1,524 rows. I am not sure why this is happening. When this table is loaded into a straight table it only shows 51 rows. I need it to load 51 rows because I OUTER JOIN to this table and it makes a difference of over 200 million rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Mar 2013 20:45:08 GMT</pubDate>
    <dc:creator>tchovanec</dc:creator>
    <dc:date>2013-03-04T20:45:08Z</dc:date>
    <item>
      <title>Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405769#M150987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a table that has distinct Month begin and end dates. Below is what I am trying to do. The code below loads 1524 rows into the MonthEnd table. I am trying to have it load only 51 rows since that is how many month start and end dates there have been since 2009. Any help would be appreciated. Thank you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13624288614092192" jivemacro_uid="_13624288614092192"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = NUM(&lt;SPAN class="jive-sql-object"&gt;DATE&lt;/SPAN&gt;('1/1/2009'));&lt;/P&gt;&lt;P&gt; LET vMaxDate = NUM(&lt;SPAN class="jive-sql-object"&gt;DATE&lt;/SPAN&gt;(TODAY()));&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vMinDate) + RowNo() - 1 &lt;SPAN class="jive-sql-keyword"&gt;AS&lt;/SPAN&gt; DateNumber&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;P&gt;&lt;/P&gt;&lt;P&gt; MonthEnd:&lt;/P&gt;&lt;P&gt; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Floor(MonthEnd(DateNumber))&lt;SPAN class="jive-sql-keyword"&gt;as&lt;/SPAN&gt; MonthEnd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Floor(MonthStart(DateNumber)) &lt;SPAN class="jive-sql-keyword"&gt;as&lt;/SPAN&gt; MonthStart&lt;/P&gt;&lt;P&gt; RESIDENT TempCalendar;&lt;BR /&gt; &lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 20:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405769#M150987</guid>
      <dc:creator>tchovanec</dc:creator>
      <dc:date>2013-03-04T20:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405770#M150988</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 like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MonthEnd:&lt;/P&gt;&lt;P&gt; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthEnd(Floor(DateNumber))as MonthEnd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,MonthStart(Floor(DateNumber)) as MonthStart&lt;/P&gt;&lt;P&gt; RESIDENT TempCalendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 20:38:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405770#M150988</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-03-04T20:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405771#M150989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried that it it still loads 1,524 rows. I am not sure why this is happening. When this table is loaded into a straight table it only shows 51 rows. I need it to load 51 rows because I OUTER JOIN to this table and it makes a difference of over 200 million rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 20:45:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405771#M150989</guid>
      <dc:creator>tchovanec</dc:creator>
      <dc:date>2013-03-04T20:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405772#M150990</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;&lt;/P&gt;&lt;P&gt; MonthEnd:&lt;/P&gt;&lt;P&gt; Load Distinct *;&lt;/P&gt;&lt;P&gt; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthEnd(Floor(DateNumber))as MonthEnd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,MonthStart(Floor(DateNumber)) as MonthStart&lt;/P&gt;&lt;P&gt; RESIDENT TempCalendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its load 1524 rows ,because it convert each and every date into month end and monthstart, so try like above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 20:50:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405772#M150990</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-03-04T20:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405773#M150991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;It is still fetching 1524 rows as seen below.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCalendar &amp;lt;&amp;lt; AUTOGENERATE(1) 1,524 lines fetched&lt;BR /&gt;MonthEnd &amp;lt;&amp;lt; TempCalendar 1,524 lines fetched &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 20:55:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405773#M150991</guid>
      <dc:creator>tchovanec</dc:creator>
      <dc:date>2013-03-04T20:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405774#M150992</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;Please check the attached file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 21:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405774#M150992</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-03-04T21:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405775#M150993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I execute the file it still shows that 1524 lines have been fetched. Is this correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 21:10:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405775#M150993</guid>
      <dc:creator>tchovanec</dc:creator>
      <dc:date>2013-03-04T21:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405776#M150994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="34323" class="jive-image-thumbnail jive-image" onclick="" alt="LinesFetched.PNG" src="https://community.qlik.com/legacyfs/online/34323_LinesFetched.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see from above it is fetching 1524 lines still. It does only show 51 in a table box or straight table. But the issue is I am outer joining to this table and I need to join to 51 rows and not 1524 because it causes the application to take much longer to run. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 21:15:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405776#M150994</guid>
      <dc:creator>tchovanec</dc:creator>
      <dc:date>2013-03-04T21:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405777#M150995</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;Its correct.. Because, one month contain 30/31 days.. but monthstart(ex:01/01/2013) and month end(01/31/2013) .. its mapp with all days. Its logic behind it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date monthstart monthend&lt;/P&gt;&lt;P&gt;01/01/2013 01/01/2013 01/31/2013&lt;/P&gt;&lt;P&gt;01/02/2013 01/01/2013 01/31/2013&lt;/P&gt;&lt;P&gt;01/03/2013 01/01/2013 01/31/2013&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;01/31/2013 01/01/2013 01/31/2013&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for each month , each day map with month end and month start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you see in table viewer, you can notice that only 51 rows in the monthend table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 21:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405777#M150995</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2013-03-04T21:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Month Begin and End</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405778#M150996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the insight and help. Here is how I got it to work. &lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13624321206149956" jivemacro_uid="_13624321206149956"&gt;&lt;P&gt;LET vMinDate = NUM(DATE('1/1/2009'));&lt;/P&gt;&lt;P&gt;LET vMaxDate = NUM(DATE(TODAY()));&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vMinDate) + RowNo() - 1 AS DateNumber&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;P&gt;&lt;/P&gt;&lt;P&gt; MonthEnd:&lt;/P&gt;&lt;P&gt; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Floor(MonthEnd(DateNumber))as EndMonth&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Floor(MonthStart(DateNumber)) as StartMonth&lt;/P&gt;&lt;P&gt; RESIDENT TempCalendar;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; Max_MonthEnd:&lt;BR /&gt; Load&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthEnd(EndMonth) as MnthEnd,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthStart(StartMonth) as MnthStrt,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAX(EndMonth) as Max_MonthEnd&lt;BR /&gt;RESIDENT MonthEnd&lt;BR /&gt;Group By EndMonth, StartMonth;&lt;BR /&gt; &lt;BR /&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 21:25:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Month-Begin-and-End/m-p/405778#M150996</guid>
      <dc:creator>tchovanec</dc:creator>
      <dc:date>2013-03-04T21:25:51Z</dc:date>
    </item>
  </channel>
</rss>

