<?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 Numbering identical transactions in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172094#M41776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea thats the only way i could think of. A solution comparing all rows would probably be too slow anyway.&lt;/P&gt;&lt;P&gt;Thanks Stephen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Nov 2010 15:41:13 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-04T15:41:13Z</dc:date>
    <item>
      <title>Numbering identical transactions in script</title>
      <link>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172090#M41772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to number all identical financial transactions [1, 2, 3, ...].&lt;/P&gt;&lt;P&gt;The base data looks like:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-2734_sourceID:2734" /&gt;&lt;/P&gt;&lt;P&gt;In the script i want to add a new field numbering each transaction from 1 and up.&lt;/P&gt;&lt;P&gt;First appearance of DK-00001 is numbered 1, second appearance is numbered 2 etc.&lt;/P&gt;&lt;P&gt;The transaction DK-00002 only appears once and is numbered 1.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-2735_sourceID:2735" /&gt;&lt;/P&gt;&lt;P&gt;I've been unable to find a way to count the number of existing rows with the same Transaction. I cant seem to find a way using EXISTS() and COUNT().&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Frederik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 13:53:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172090#M41772</guid>
      <dc:creator />
      <dc:date>2010-11-04T13:53:55Z</dc:date>
    </item>
    <item>
      <title>Numbering identical transactions in script</title>
      <link>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172091#M41773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frederik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would probably do it with an IF statement comparing the Previous values:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;If(Transaction = Previous(Transaction), Peek('Number')+1, 1) As Number&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 14:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172091#M41773</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2010-11-04T14:16:14Z</dc:date>
    </item>
    <item>
      <title>Numbering identical transactions in script</title>
      <link>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172092#M41774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen&lt;/P&gt;&lt;P&gt;Nice solution.It does have the limit that Previous() only looks at the one row before it. If the transactions are not allocated one after another they will not be found.&lt;/P&gt;&lt;P&gt;Can Previous() be exchanged with a function that looks at all rows and selects the most recent one with the same Transaction?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 14:33:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172092#M41774</guid>
      <dc:creator />
      <dc:date>2010-11-04T14:33:05Z</dc:date>
    </item>
    <item>
      <title>Numbering identical transactions in script</title>
      <link>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172093#M41775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, should have noted that.&lt;/P&gt;&lt;P&gt;You should sort your data on the way in or this will not work.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 15:17:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172093#M41775</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2010-11-04T15:17:34Z</dc:date>
    </item>
    <item>
      <title>Numbering identical transactions in script</title>
      <link>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172094#M41776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea thats the only way i could think of. A solution comparing all rows would probably be too slow anyway.&lt;/P&gt;&lt;P&gt;Thanks Stephen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 15:41:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Numbering-identical-transactions-in-script/m-p/172094#M41776</guid>
      <dc:creator />
      <dc:date>2010-11-04T15:41:13Z</dc:date>
    </item>
  </channel>
</rss>

