<?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: Peek and Concatenate missunderstanding in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295148#M615972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I think I Find out what is really happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Way QV does the concatenate is &lt;STRONG&gt;not&lt;/STRONG&gt; ROW by ROW unless it &lt;STRONG&gt;must&lt;/STRONG&gt; do it this way. If is possible for the QV just adds the whole table with one step and then checks the where condition after it. It is easy to see that if the that this consumes much less memory and is faster than do it row by row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This process is &lt;SPAN style="font-size: 13.3333px;"&gt;like if it was pasting the memory location of the first row just after the last row of the previous table in order to start with the new one.&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;This does not happen if there is a calculated field on the load, then the QV is forced to create it row by row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Event though I marked this answer as the correct (because is the one that answers the question), &lt;/SPAN&gt;If someone reads this searching for a way to eliminate duplicates, please, read the answers of the other people, among them there are pretty good ways to do it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jun 2017 14:20:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-14T14:20:14Z</dc:date>
    <item>
      <title>Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295137#M615961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp; I have a little problem that I think that comes from the misunderstanding of the Concatenate or Peek functions. As far as I know those functions do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;Concactenate (Old_Table)&lt;/EM&gt;: Used when loading a table this adds the rows of the new tabla at de &lt;STRONG&gt;end of (in the last position) &lt;/STRONG&gt;the Old_Table to create the New_Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;Peek(Field)&lt;/EM&gt;: Written this way, this function returns the value of the &lt;STRONG&gt;last row&lt;/STRONG&gt; of the &lt;STRONG&gt;new table&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given This, suppose that I have a Table named "&lt;EM&gt;Old Table&lt;/EM&gt;"&amp;nbsp; whit data of some product that includes sn (Serial Number) , date (Timestamp), and Color. What I want is to Concatenate Table_With_Duplicates to it so i use a where statement with peeks to check if the &lt;STRONG&gt;last row&lt;/STRONG&gt; value is the same as the new one I want to introduce and discard it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;Concatenate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(Old_Table):&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; *&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; Table_Sorted_With_Duplicates &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;not&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;date &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;and &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;sn&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;sn&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;and &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;COLOR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;COLOR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;));&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;drop &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;Table_Sorted_With_Duplicates&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;










&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this code, when on the old table still there but if I create first a table without duplicates and then concatenate it works:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12px; font-family: 'Courier New';"&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; font-family: 'Courier New';"&gt;Table_Clean:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; *&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; Table&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;_Sorted&lt;/SPAN&gt;_With_Duplicates &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;not&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;date &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;and &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;sn&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;sn&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;and &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;COLOR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;COLOR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;));&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;drop &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;Table&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;_Sorted&lt;/SPAN&gt;_With_Duplicates&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;SPAN style="color: #0000ff; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;Concatenate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(Old_Table):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; *&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;Table_Clean;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;drop &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px;"&gt;Table_Clean&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;










&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My point is that there is something that I misunderstand abount the &lt;STRONG&gt;Concatenate&lt;/STRONG&gt; function on QV and when you use it the new rows are not added at the end of the table where the &lt;EM&gt;peek&lt;/EM&gt; is checking.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I provide you an example to test it. Also, I have testested with &lt;EM&gt;peek&lt;/EM&gt;( Variable, 1)&amp;nbsp; in order to know if the values are added on the top an does not have worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 10:19:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295137#M615961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T10:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295138#M615962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cannot rebuild your problem, your assumptions on concatenate and peek are correct.&lt;/P&gt;&lt;P&gt;You may share some sample data in order to have a closer look&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please find a simplified model attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 12:13:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295138#M615962</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2017-06-01T12:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295139#M615963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A href="https://community.qlik.com/qlik-users/2860"&gt;prieper&lt;/A&gt;‌&amp;nbsp; I have attached you a QV with a better example. I have attatched on the original post a QV with an example. Because I can not do it here. On the example there is a variable named &lt;EM&gt;vLoadType &lt;/EM&gt; that allow you to try both cases. Also on the chart in the main page you will see that the duplicates still there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You for your response&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 13:56:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295139#M615963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T13:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295140#M615964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure, but think that the PEEK in the WHERE-clause makes the trouble..&lt;/P&gt;&lt;P&gt;Try PREVIOUS instead.&lt;/P&gt;&lt;P&gt;(Believe that a while ago I have read an article on the difference betw both command)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edith has found a link to this problem:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3048"&gt;Peek() vs Previous() – When to Use Each&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 14:22:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295140#M615964</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2017-06-01T14:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295141#M615965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, with &lt;EM&gt;previous&lt;/EM&gt;&lt;EM&gt;()&lt;/EM&gt; work fine as it should because only looks at the values of the previous table, I read an article once that was talking about that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is wondering me is why &lt;EM&gt;peek&lt;/EM&gt;&lt;EM&gt;()&lt;/EM&gt; is failing here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 14:29:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295141#M615965</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T14:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295142#M615966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest to create a temporary key in your first table as follows: AutoNumberHash256(date, sn, COLOR) as Key_temp. Then for the concatenation use the where clause : Where Not Exists('Key_temp', AutoNumberHash256(date, sn, COLOR)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Julie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 15:45:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295142#M615966</guid>
      <dc:creator>juliedecoene</dc:creator>
      <dc:date>2017-06-01T15:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295143#M615967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't know that way. Does it mean that the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;AutoNumberHash256()&lt;/SPAN&gt; function does not have a value (or it is null) when there is a repetition and that is why you charge just when the field exists?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I think that the one that just applies on the table you are loading from is the &lt;EM&gt;previous&lt;/EM&gt; and that is why it work. :S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 16:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295143#M615967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T16:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295144#M615968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The AutoNumberHash will calculate an unique key for each combination of the expressions inside it. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The Exists will compare the new keys with existing ones. Exists checks the field Key_temp in the whole model.&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;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN style="background-color: #3399ff; color: #ffffff;"&gt;exists&lt;/SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;field [ , expression ] &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Determines whether a specific field value &lt;SPAN style="background-color: #3399ff; color: #ffffff;"&gt;exists&lt;/SPAN&gt; in a specified field of the data loaded so far. &lt;SPAN class="Italic"&gt;Field&lt;/SPAN&gt; is a name or a string expression evaluating to a field name. The field must &lt;SPAN style="background-color: #3399ff; color: #ffffff;"&gt;exist&lt;/SPAN&gt; in the data loaded so far by the script. &lt;SPAN class="Italic"&gt;Expr&lt;/SPAN&gt; is an expression evaluating to the field value to look for in the specified field. If omitted, the current record’s value in the specified field will be assumed. &lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&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;I believe this is a more robust solution than only looking at the previous record, since it will check the whole model for duplicates. If you use Peek or Previous you first need to sort your records and apparently it does not work with concatenate, so that's a lot of manipulation that can be avoided with the Exists() function and a key.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 16:52:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295144#M615968</guid>
      <dc:creator>juliedecoene</dc:creator>
      <dc:date>2017-06-01T16:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295145#M615969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know if you noticed in your example, but the 2 last lines with D2, S2 from table 2 are not loaded, which means in the case of using Concatenate and Peek together, you are comparing &lt;SPAN style="text-decoration: underline;"&gt;all&lt;/SPAN&gt; the records of table 2 with the last one of table 1. So it seems to be a consequence the order in which QV is performing the different operations. Sorry I cannot explain more than that why it's not working as you expected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 17:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295145#M615969</guid>
      <dc:creator>juliedecoene</dc:creator>
      <dc:date>2017-06-01T17:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295146#M615970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like a lot your solution in order to remove duplicates! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's true that is really robust and you don't need to load the table two times (which is really good to clean the script). I wonder if it is faster or not than the one with &lt;EM&gt;previous()&lt;/EM&gt;, but right now for me this is not much important.&lt;/P&gt;&lt;P&gt;&lt;/P&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>Fri, 02 Jun 2017 15:08:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295146#M615970</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-02T15:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295147#M615971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is True and I did not have noticed about that. Also I checked that if you use &lt;EM&gt;peek( Field, &lt;STRONG&gt;1&lt;/STRONG&gt; )&lt;/EM&gt; taking the first value the ones that are not there are &lt;EM&gt;S1, D1&lt;/EM&gt; that are the ones in the first place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This makes me think in 2 possibilities:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1- The QV is inserting the data on some strange place in the middle (and I would like to find where)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2- Maybe, doing the &lt;EM&gt;peek&lt;/EM&gt; on the while statement is looking at the Old_Table, but not the concatenation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, thank you for your comments. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 15:15:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295147#M615971</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-02T15:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and Concatenate missunderstanding</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295148#M615972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I think I Find out what is really happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Way QV does the concatenate is &lt;STRONG&gt;not&lt;/STRONG&gt; ROW by ROW unless it &lt;STRONG&gt;must&lt;/STRONG&gt; do it this way. If is possible for the QV just adds the whole table with one step and then checks the where condition after it. It is easy to see that if the that this consumes much less memory and is faster than do it row by row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This process is &lt;SPAN style="font-size: 13.3333px;"&gt;like if it was pasting the memory location of the first row just after the last row of the previous table in order to start with the new one.&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;This does not happen if there is a calculated field on the load, then the QV is forced to create it row by row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Event though I marked this answer as the correct (because is the one that answers the question), &lt;/SPAN&gt;If someone reads this searching for a way to eliminate duplicates, please, read the answers of the other people, among them there are pretty good ways to do it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 14:20:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-and-Concatenate-missunderstanding/m-p/1295148#M615972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-14T14:20:14Z</dc:date>
    </item>
  </channel>
</rss>

