<?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: Counter in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862770#M301954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navdeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I test this without the excel file?&amp;nbsp; Before creating post in community attach sample file and data then it would be easier to give solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Apr 2015 09:22:11 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2015-04-07T09:22:11Z</dc:date>
    <item>
      <title>Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862763#M301947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have Year and Month in script and want to add one more column in table which has sequential increment whenever month or year increase . Please suggest the logic to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 07:29:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862763#M301947</guid>
      <dc:creator />
      <dc:date>2015-04-07T07:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862764#M301948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navdeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you have to first sort your table by Year and Month and then use the PEEK() or PREVIOUS() function to look at the record right above the one you're currently loading and to see if it's the same - and if it's not, increase a counter, otherwise copy the counter_value from above, again using one of those functions.&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 07:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862764#M301948</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-04-07T07:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862765#M301949</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;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;If(Peek(Year) &amp;lt;&amp;gt; Year OR Peek(Month) &amp;lt;&amp;gt; Month, 1, Peek(Sequence) + 1) AS Sequence&lt;/P&gt;&lt;P&gt;If(&lt;/P&gt;&lt;P&gt;FROM DataSource&lt;/P&gt;&lt;P&gt;ORDER BY Year, Month;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 07:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862765#M301949</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-04-07T07:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862766#M301950</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;T1:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Previous(Year)&amp;lt;&amp;gt;Year or Previous(Month)&amp;lt;&amp;gt;Month, rangesum(1, peek('Flag')),peek(Flag)) as Flag&lt;/P&gt;&lt;P&gt;resident calendar&lt;/P&gt;&lt;P&gt;order by Year, Month, Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Calendar;&lt;/P&gt;&lt;P&gt;rename Table t1 to Calendar;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 07:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862766#M301950</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-04-07T07:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862767#M301951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems good, can you give the syntax as I am using &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;If((Month)&amp;lt;&amp;gt;Peek(Month) or Year&amp;lt;&amp;gt;Peek(Year), Peek(Check)+1, Peek(Check)) as Check1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and not getting the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Navdeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 07:55:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862767#M301951</guid>
      <dc:creator />
      <dc:date>2015-04-07T07:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862768#M301952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navdeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you checked this.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;*,&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;If(Peek(Year) &amp;lt;&amp;gt; Year OR Peek(Month) &amp;lt;&amp;gt; Month, 1, Peek(Sequence) + 1) AS Sequence&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;If(&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;FROM DataSource&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;ORDER BY Year, Month;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 08:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862768#M301952</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-04-07T08:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862769#M301953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this one but not getting proper O/P. PFA the app,Excel file and expected O/P.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 09:07:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862769#M301953</guid>
      <dc:creator />
      <dc:date>2015-04-07T09:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862770#M301954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navdeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I test this without the excel file?&amp;nbsp; Before creating post in community attach sample file and data then it would be easier to give solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 09:22:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862770#M301954</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-04-07T09:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862771#M301955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's attached now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 09:40:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862771#M301955</guid>
      <dc:creator />
      <dc:date>2015-04-07T09:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862772#M301956</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;What is your expected output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 09:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862772#M301956</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-04-07T09:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862773#M301957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Buddy it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 09:50:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862773#M301957</guid>
      <dc:creator />
      <dc:date>2015-04-07T09:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862774#M301958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sorry Buddy for incomplete post, next time will keep in mind :-). Thanks for time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 09:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862774#M301958</guid>
      <dc:creator />
      <dc:date>2015-04-07T09:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Counter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862775#M301959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14284009258261804 jive_text_macro" jivemacro_uid="_14284009258261804"&gt;
&lt;P&gt;Temp:&lt;/P&gt;
&lt;P&gt;LOAD Month, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Division&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;Data.xlsx&lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Final:&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;/P&gt;
&lt;P&gt;Load *,AutoNumber(Year &amp;amp; Month) Resident Temp Order by Year, Month, Division;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Drop Table Temp;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 10:02:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counter-in-Script/m-p/862775#M301959</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2015-04-07T10:02:35Z</dc:date>
    </item>
  </channel>
</rss>

