<?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 Problem whit month iteration (for...next) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-whit-month-iteration-for-next/m-p/335337#M705004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i need to (monthly) iterate from InitMonth to ActualMonth but this code doesn't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vActualMonth = Num(MonthStart(Today()));&lt;/P&gt;&lt;P&gt;LET vInitMonth = Num(MonthStart(AddMonths(vActualMonth, -2)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR vLoopMonth = vInitMonth to vActualMonth step AddMonths(vLoopMonth, 1)&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;NEXT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i skip the step expression i can iterate daily but i want to get a monthly iteration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Apr 2012 16:40:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-03T16:40:45Z</dc:date>
    <item>
      <title>Problem whit month iteration (for...next)</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-whit-month-iteration-for-next/m-p/335337#M705004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i need to (monthly) iterate from InitMonth to ActualMonth but this code doesn't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vActualMonth = Num(MonthStart(Today()));&lt;/P&gt;&lt;P&gt;LET vInitMonth = Num(MonthStart(AddMonths(vActualMonth, -2)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR vLoopMonth = vInitMonth to vActualMonth step AddMonths(vLoopMonth, 1)&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;NEXT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i skip the step expression i can iterate daily but i want to get a monthly iteration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 16:40:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-whit-month-iteration-for-next/m-p/335337#M705004</guid>
      <dc:creator />
      <dc:date>2012-04-03T16:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem whit month iteration (for...next)</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-whit-month-iteration-for-next/m-p/335338#M705005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The step expression is only evaluated once and it is an increment, so that approach won't work. Here's another approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LET vActualMonth = Num(MonthStart(Today()));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LET vInitMonth = Num(MonthStart(AddMonths(vActualMonth, -2)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FOR i = 0 to 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vLoopMonth = AddMonths($(vInitMonth), $(i));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do something with vLoopMonth&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NEXT i&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 18:42:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-whit-month-iteration-for-next/m-p/335338#M705005</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-04-03T18:42:58Z</dc:date>
    </item>
  </channel>
</rss>

