<?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: Creating a unique ID field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389338#M818207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;I reloaded all my data today using your code and it seems to be working fine at the moment. &lt;/P&gt;&lt;P&gt;I will keep you posted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for the help. Appreciate it!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Aug 2017 03:45:57 GMT</pubDate>
    <dc:creator>s2016</dc:creator>
    <dc:date>2017-08-29T03:45:57Z</dc:date>
    <item>
      <title>Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389332#M818201</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 have a fact table data in daily QVD's (e.g. &lt;SPAN style="font-size: 13.3333px;"&gt;Traffic_20170827.qvd&lt;/SPAN&gt;). Each file has multiple "&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;entity_name_raw" &lt;/STRONG&gt;and each day there are some new &lt;STRONG style="font-size: 13.3333px;"&gt;entity_name_raw&lt;/STRONG&gt;. I need to assign a unique ID to each entity_name_raw. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I am using the below script to do that. Although this script runs fine on most of the days but sometimes a different ID is assigned to a &lt;STRONG style="font-size: 13.3333px;"&gt;entity_name_raw &lt;/STRONG&gt;each day the script runs. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Entity_Bigpond_TID:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Distinct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entity_name_raw&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(vL.QVDDestPath)Traffic_*.qvd]&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Entity_temp:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entity_name_raw,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text('E_BT' &amp;amp; num(AutoNumber(entity_name_raw, 'auto1'), '000000000'))&amp;nbsp; as entity_id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident Entity_Bigpond_TID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest a better way to achieve this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shashank &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389332#M818201</guid>
      <dc:creator>s2016</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389333#M818202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Although this script runs fine on most of the days but sometimes a different ID is assigned to a &lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;entity_name_raw &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;each day the script runs. &lt;/SPAN&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I am not sure I understand this? A different ID is assigned to a entity_name_raw each day? This happens only sometimes? Can you elaborate of may be show some examples?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternative might be this, but not sure if this will address the above issue or not&lt;/P&gt;&lt;P&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&gt;Entity_Bigpond_TID:&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&gt;LOAD&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&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Distinct&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&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entity_name_raw&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&gt;FROM&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&gt;[$(vL.QVDDestPath)Traffic_*.qvd]&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&gt;(qvd);&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;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Entity_temp:&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="color: #ff0000;"&gt;LOAD *,&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&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;text('E_BT' &amp;amp; num(RowNo, '000000000'))&amp;nbsp; as entity_id;&lt;/SPAN&gt;&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&gt;LOAD&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&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entity_name_raw,&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&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt; If(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;entity_name_raw = Previous(&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;entity_name_raw), Alt(Peek('RowNo'), 1), RangeSum(Peek('RowNo'), 1)) as RowNo&lt;/SPAN&gt;&lt;/SPAN&gt;&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&gt;Resident Entity_Bigpond_TID&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="color: #ff0000;"&gt;Order By &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;entity_name_raw&lt;/STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 01:14:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389333#M818202</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-28T01:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389334#M818203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;Look at the screenshot below. Until 20178/20, E_CM000000001 was assigned to a particular Entity and it changed later.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Entity.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/174807_Entity.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 01:28:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389334#M818203</guid>
      <dc:creator>s2016</dc:creator>
      <dc:date>2017-08-28T01:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389335#M818204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try the approach I provided above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 01:39:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389335#M818204</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-28T01:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389336#M818205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean that a different ID is assigned by Autonumber? Autonumber() starts from scratch at each load and it numbers on the load order sequence. If your source data changes the load order, then the autonumber will change as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 05:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389336#M818205</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-08-28T05:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389337#M818206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's true Jonathan. My assumption was that when I am loading the data from QVD's using &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Traffic_*.qvd method the new entities would automatically be appended in the last. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;Correct me if I am wrong, but my understanding is that all the distinct &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;entity_name_raw &lt;/STRONG&gt;from the first QVD would be loaded in memory first and then all the new entity_name_raw from other QVD's (which are not present in the first QVD) would be appended at the end. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&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; font-size: 12px;"&gt;Can you help me understand how load using &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;*.qvd works.&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 07:17:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389337#M818206</guid>
      <dc:creator>s2016</dc:creator>
      <dc:date>2017-08-28T07:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389338#M818207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;I reloaded all my data today using your code and it seems to be working fine at the moment. &lt;/P&gt;&lt;P&gt;I will keep you posted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for the help. Appreciate it!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 03:45:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389338#M818207</guid>
      <dc:creator>s2016</dc:creator>
      <dc:date>2017-08-29T03:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389339#M818208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shashank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in order to avoid collisions like this try using AutoNumberHash, instead of AutoNumber.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The key difference here is that AutoNumberHash is deterministic, and thus should avoid assigning the same result to more than one row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/683831" title="https://community.qlik.com/message/683831"&gt;https://community.qlik.com/message/683831&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 07:34:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389339#M818208</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2017-08-29T07:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389340#M818209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reading through this does make sense. &lt;SPAN style="font-size: 10pt;"&gt;Thanks Marcus. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I think this should be the correct solution. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;At the moment, Sunny's code is working fine for me but I will test the AutoNumberHash() funtion as well.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 23:55:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389340#M818209</guid>
      <dc:creator>s2016</dc:creator>
      <dc:date>2017-08-29T23:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389341#M818210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both the approaches failed today (Sunny's and Marcus') because both of them are dependent on the Load Order of the &lt;STRONG style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;entity_name_raw&amp;nbsp; &lt;/STRONG&gt;from the QVD files. The entity_name_raw&amp;nbsp; must be in a certain fixed order with new ones added at the end for both the methods to work correctly.&amp;nbsp; &lt;/P&gt;&lt;P&gt;To my surprise, QV doesn't keep the load order from the original files and loads them in random order sometimes (which is strange). &lt;/P&gt;&lt;P&gt;Can someone explain how the ordering works while loading the data and why does QV shuffle the load order? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 01:11:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389341#M818210</guid>
      <dc:creator>s2016</dc:creator>
      <dc:date>2017-08-31T01:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389342#M818211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you not doing the Order By statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/175135_Capture.PNG" style="height: 318px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 01:40:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389342#M818211</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-31T01:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389343#M818212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;I think I missed this earlier. Will try again. Thanks! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;Can you also brief me about how your logic works.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 01:47:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389343#M818212</guid>
      <dc:creator>s2016</dc:creator>
      <dc:date>2017-08-31T01:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389344#M818213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically after you have loaded all your files into a QlikView table, you will need to take a resident load where you will sort the table by &lt;STRONG&gt;entity_name_raw&lt;/STRONG&gt; and this will then be used here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(entity_name_raw = Previous(entity_name_raw), Alt(Peek('RowNo'), 1), RangeSum(Peek('RowNo'), 1)) as RowNo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This logic is just checking if entity_name_row is equal to previous row or not. If it is, then use the same RowNo as before, else add 1 to the previous RowNo value in the sorted table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 01:51:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389344#M818213</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-31T01:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389345#M818214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks for the explanation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Basically what I want is consistent ID's for each Entity_Name_Raw. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;eg) If&amp;nbsp; 'xyz' has '0000100' assigned to it today, it should remain '0000100' all the times in future, just like you would expect in a database table. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I hope I am making my point clear. The end users want to use this info as a reference table with a consistent and unique id for each &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Entity_Name_Raw&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I am concerned that if the order changes in the sorted table (which definitely would once new &lt;SPAN style="font-size: 13.3333px;"&gt;Entity_Name_Raw&lt;/SPAN&gt; are added), your code might not work as required.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 02:15:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389345#M818214</guid>
      <dc:creator>s2016</dc:creator>
      <dc:date>2017-08-31T02:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389346#M818215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that after each reload, the value should not be changing? May be store the value in a qvd and then only assign a value to a new Entity?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 11:27:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389346#M818215</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-08-31T11:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a unique ID field</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389348#M818217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a sample for you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Day 1&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 Entity&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FirstFile.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UniqueID:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Entity,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Entity = Previous(Entity), Peek('RowNo'), RangeSum(Peek('RowNo'), 1)) as RowNo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Entity;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STORE UniqueID into UniqueID.qvd (qvd);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You run your main fact table and create a new table UniqueID where you create the ID (I have used the name RowNo)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Day 2 and Onwards (In the sample I have did Day2 and Day3... but the script is the same)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UniqueID:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Entity as EntityCheck, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowNo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM UniqueID.qvd (qvd);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MaxID:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Max(RowNo) as Max&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident UniqueID;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vMaxID = Peek('Max');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TRACE $(vMaxID);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table MaxID;&lt;/STRONG&gt;&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 Entity&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SecondFile.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Temp:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Entity as EntityCheck,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Entity = Previous(Entity), Peek('RowNo'), RangeSum(Alt(Peek('RowNo'), $(vMaxID)), 1)) as RowNo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where not Exists(EntityCheck, Entity)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Entity;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalUniqueID:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD EntityCheck as Entity,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RowNo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident UniqueID;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table UniqueID;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate(FinalUniqueID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD EntityCheck as Entity,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RowNo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STORE FinalUniqueID into UniqueID.qvd (qvd);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RENAME Table FinalUniqueID to UniqueID;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, basically Day 1 is needed one time to initiate the qvd building process. Once created, you will always need to run Day 2 and onward script...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the sample just run the script for one day at a time and comment the other days and start with Day 1.&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>Fri, 01 Sep 2017 00:29:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-unique-ID-field/m-p/1389348#M818217</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-01T00:29:23Z</dc:date>
    </item>
  </channel>
</rss>

