<?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: id Generator in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932443#M961786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;thank you very much was very useful help your greetings&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;luis espinoza &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Oct 2015 21:34:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-10-20T21:34:22Z</dc:date>
    <item>
      <title>id Generator</title>
      <link>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932438#M961781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;good afternoon I need your help ... I want to create QlikView id for each change me the name of a program I get a different id ... annex an example of what I want to do qlikview ...&lt;BR /&gt;&lt;BR /&gt;1 power rangers&lt;BR /&gt;2 Today&lt;BR /&gt;2 Today&lt;BR /&gt;2 Today&lt;BR /&gt;3 SpongeBob&lt;BR /&gt;4 Sylvester &amp;amp; Tweety Mysteries&lt;BR /&gt;5 today&lt;BR /&gt;5 today&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;what I need is that each change the program assigned me a new id&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 19:09:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932438#M961781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-20T19:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: id Generator</title>
      <link>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932439#M961782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: line-through;"&gt;LOAD Program,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Peek('Program') = Program, Peek('ID'), Peek('ID') + 1) as ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: line-through;"&gt;FROM Source&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: line-through;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LOAD Program,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alt(If(Peek('Program') = Program, Peek('ID'), Peek('ID') + 1), 1) as ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;FROM Source&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 21:13:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932439#M961782</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-20T21:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: id Generator</title>
      <link>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932440#M961783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attaching a sample. Script:&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 * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Program&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;power rangers&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Today&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Today&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Today&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SpongeBob&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sylvester &amp;amp; Tweety Mysteries&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;today&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;today&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NewTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD RowNo() as [Row Number],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Program,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Alt(If(Peek('Program') = Program, Peek('ID'), Peek('ID') + 1), 1) as ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102608_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Row Number is added just to show that you have Today showing up thrice, otherwise table box would have just showed it once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 21:19:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932440#M961783</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-20T21:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: id Generator</title>
      <link>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932441#M961784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Almost right. However, Peek('ID') will return NULL on the first row and since NULL + 1 =&amp;gt; NULL, it will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this instead:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LOAD Program,&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 style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Peek('Program') = Program, Peek('ID'), RangeSum(Peek('ID'), 1)) as ID&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 style="font-style: inherit; font-family: inherit;"&gt;FROM Source&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 style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 21:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932441#M961784</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-10-20T21:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: id Generator</title>
      <link>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932442#M961785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did find my mistake, but handled it a little differently with Alt function. But I do like RangeSum solution, much more elegant. Thanks for sharing &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Alt(If(Peek('Program') = Program, Peek('ID'), Peek('ID') + 1), 1) as ID&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 21:22:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932442#M961785</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-20T21:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: id Generator</title>
      <link>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932443#M961786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;thank you very much was very useful help your greetings&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;luis espinoza &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 21:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932443#M961786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-20T21:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: id Generator</title>
      <link>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932444#M961787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 21:36:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/id-Generator/m-p/932444#M961787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-20T21:36:13Z</dc:date>
    </item>
  </channel>
</rss>

