<?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: Loop load with month name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727819#M670376</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again &lt;A href="https://community.qlik.com/qlik-users/61824"&gt;Marco Wedel&lt;/A&gt;!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to obtain a snapshot table with a date field ("Date") not related with my date transactional field (CreationDate). I can do it well with the loop syntax provided by Massimo. &lt;/P&gt;&lt;P&gt;I think this will be perfect for now!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;EM&gt;for i=-1 to -3 step -1&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;TicketsSnapshot:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MonthName( (monthend(addmonths (today(),&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;$(i)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;1))) ) as Date,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;// TICKETS CREATED ON PREVIOUS MONTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Count (if(MonthEnd(CreationDate)= (monthend(addmonths (today(),&lt;STRONG&gt;$(i)&lt;/STRONG&gt;,1))), TicketNumber)) as &lt;STRONG&gt;Created&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;// TICKETS ACCUMULATED UNTIL PREVIOUS MONTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Count (if(MonthEnd(CreationDate)&amp;lt;= (monthend(addmonths (today(),&lt;STRONG&gt;$(i),&lt;/STRONG&gt;1))),TicketNumber)) AS &lt;STRONG&gt;[Accumulated Tickets]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Resident TICKETS;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;next;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Tickets.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/70120_Tickets.jpg" style="width: 620px; height: 397px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Oct 2014 15:04:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-30T15:04:50Z</dc:date>
    <item>
      <title>Loop load with month name</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727816#M670373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a load statement like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATES_BY_MONTH:&lt;/P&gt;&lt;P&gt;LOAD: &lt;/P&gt;&lt;P&gt;MonthName( (monthend(addmonths (today(),&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;-1&lt;/STRONG&gt;&lt;/SPAN&gt;,1))) ) as Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT MyTable&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;LOAD: &lt;/P&gt;&lt;P&gt;MonthName( (monthend(addmonths (today(),&lt;STRONG style=": ; color: #ff0000;"&gt;-2&lt;/STRONG&gt;,1))) ) as Date&lt;/P&gt;&lt;P&gt;RESIDENT MyTable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;LOAD: &lt;/P&gt;&lt;P&gt;MonthName( (monthend(addmonths (today(),&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;-3&lt;/STRONG&gt;&lt;/SPAN&gt;,1))) ) as Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT MyTable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;and so on... &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to do this concatenation &lt;EM&gt;for each month name&lt;/EM&gt; available in my date field on "MyTable". I would to set a loop that browse these months names and make the load dynamically. In the example I'm adding a negative number for each month name on the addmonths function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx you all!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pablo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 20:55:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727816#M670373</guid>
      <dc:creator />
      <dc:date>2014-10-29T20:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Loop load with month name</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727817#M670374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for i=-1 to -12 step -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATES_BY_MONTH:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthName( (monthend(addmonths (today(),$(i),1))) ) as Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT MyTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 21:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727817#M670374</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-10-29T21:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Loop load with month name</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727818#M670375</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;can you describe a bit more in detail what you like to achieve with this script?&lt;/P&gt;&lt;P&gt;Maybe with sample data for input as well as output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One remark though:&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_1414625363923799" jivemacro_uid="_1414625363923799"&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MonthName( (monthend(addmonths (today(),&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;-3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;,1))) ) as Date&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;should return no different results than&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&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_1414625368043472" jivemacro_uid="_1414625368043472"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MonthName(AddMonths(Today(),-1)) as Date&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as the MonthEnd function is rendered useless by the MonthName function as well as the third parameter of the AddMonths function has no effect due to the enclosing MonthEnd function.&lt;/P&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>Wed, 29 Oct 2014 23:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727818#M670375</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-10-29T23:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Loop load with month name</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727819#M670376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again &lt;A href="https://community.qlik.com/qlik-users/61824"&gt;Marco Wedel&lt;/A&gt;!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to obtain a snapshot table with a date field ("Date") not related with my date transactional field (CreationDate). I can do it well with the loop syntax provided by Massimo. &lt;/P&gt;&lt;P&gt;I think this will be perfect for now!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;EM&gt;for i=-1 to -3 step -1&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;TicketsSnapshot:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MonthName( (monthend(addmonths (today(),&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;$(i)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;1))) ) as Date,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;// TICKETS CREATED ON PREVIOUS MONTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Count (if(MonthEnd(CreationDate)= (monthend(addmonths (today(),&lt;STRONG&gt;$(i)&lt;/STRONG&gt;,1))), TicketNumber)) as &lt;STRONG&gt;Created&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;// TICKETS ACCUMULATED UNTIL PREVIOUS MONTH&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Count (if(MonthEnd(CreationDate)&amp;lt;= (monthend(addmonths (today(),&lt;STRONG&gt;$(i),&lt;/STRONG&gt;1))),TicketNumber)) AS &lt;STRONG&gt;[Accumulated Tickets]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Resident TICKETS;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;next;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Tickets.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/70120_Tickets.jpg" style="width: 620px; height: 397px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 15:04:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727819#M670376</guid>
      <dc:creator />
      <dc:date>2014-10-30T15:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Loop load with month name</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727820#M670377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Grazie mille, &lt;A href="https://community.qlik.com/qlik-users/10670"&gt;Massimo Grossi&lt;/A&gt;!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perfect!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pablo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 15:07:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-load-with-month-name/m-p/727820#M670377</guid>
      <dc:creator />
      <dc:date>2014-10-30T15:07:03Z</dc:date>
    </item>
  </channel>
</rss>

