<?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: Issue with For Loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279245#M401375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly Sunny. I tried your logic. But it takes from Feb because of Iterno() starting from 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Nov 2016 21:36:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-11-18T21:36:22Z</dc:date>
    <item>
      <title>Issue with For Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279242#M401372</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;I am trying to load all the months prior to this month for the calendar year. I have written the following logic but i am not getting the desied result. Example, current month is November. So, i will have to load all the previous months from Jan to Oct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let &lt;SPAN style="font-size: 13.3333px;"&gt;vDateToday = Num(today()); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let TotalMonths= (Num(Month($(vDateToday))) -1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = 1 to $(TotalMonths)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load Text(Month(MakeDate(Year($(vDateToday)),($(i))))) as CalendarMonthsCompleted;&lt;/P&gt;&lt;P&gt;next i ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Please help&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 21:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279242#M401372</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-18T21:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with For Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279243#M401373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also this script is just loading only one value which is Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 21:20:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279243#M401373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-18T21:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with For Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279244#M401374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying to create a table which only include 1 month less than current month? May be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Month(AddMonths(YearStart(Today()), IterNo()) as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CalendarMonthsCompleted&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;While IterNo() &amp;lt; Num(Month(Today());&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 21:23:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279244#M401374</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-18T21:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with For Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279245#M401375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly Sunny. I tried your logic. But it takes from Feb because of Iterno() starting from 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 21:36:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279245#M401375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-18T21:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with For Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279246#M401376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the requirement is to exclude the current month and include all the months prior to it. That is from Jan to Oct&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 21:37:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279246#M401376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-18T21:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with For Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279247#M401377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌my bad... try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Month(AddMonths(YearStart(Today()), IterNo() &lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;- 1&lt;/SPAN&gt;) as CalendarMonthsCompleted&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AutoGenerate 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;While IterNo() &amp;lt; Num(Month(Today());&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 21:46:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279247#M401377</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-18T21:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with For Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279248#M401378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny. That worked&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 22:35:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279248#M401378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-18T22:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with For Loop</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279249#M401379</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;one solution might be also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_240376_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/144323_QlikCommunity_Thread_240376_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1479509386871374 jive_text_macro" jivemacro_uid="_1479509386871374"&gt;
&lt;P&gt;LOAD Month(Date#(RecNo(),'M')) as Month&lt;/P&gt;
&lt;P&gt;AutoGenerate Month(Today())-1;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 22:50:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-For-Loop/m-p/1279249#M401379</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-11-18T22:50:09Z</dc:date>
    </item>
  </channel>
</rss>

