<?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: Removing duplicates on Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751506#M719886</link>
    <description>&lt;P&gt;Hi guys,&lt;BR /&gt;&lt;BR /&gt;Thanks for the quick response - much appreciated.&lt;BR /&gt;&lt;BR /&gt;The data set that I am using has 100s of rows so will the INLINE function work with these potential solutions?&lt;BR /&gt;I had used those 5 rows as a small example&lt;/P&gt;</description>
    <pubDate>Mon, 12 Oct 2020 10:23:35 GMT</pubDate>
    <dc:creator>mckay9999</dc:creator>
    <dc:date>2020-10-12T10:23:35Z</dc:date>
    <item>
      <title>Removing duplicates on Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751497#M719882</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm looking to remove duplicates in my load script however this is based on a number of columns.&amp;nbsp;&lt;BR /&gt;So for example I have a table as below:&lt;BR /&gt;&lt;BR /&gt;ID &amp;nbsp;&amp;nbsp; Status &amp;nbsp; Month Day&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp;&amp;nbsp; Success &amp;nbsp;&amp;nbsp; Jan &amp;nbsp; &amp;nbsp; 01&lt;BR /&gt;1 &amp;nbsp; &amp;nbsp;&amp;nbsp; Fail &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jan &amp;nbsp; &amp;nbsp; 01&lt;BR /&gt;2 &amp;nbsp; &amp;nbsp;&amp;nbsp; Partial &amp;nbsp; &amp;nbsp; &amp;nbsp; Jan &amp;nbsp; &amp;nbsp; 01&lt;BR /&gt;3 &amp;nbsp; &amp;nbsp;&amp;nbsp; Fail &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jan &amp;nbsp; &amp;nbsp; 01&lt;BR /&gt;3 &amp;nbsp; &amp;nbsp;&amp;nbsp; Success &amp;nbsp;&amp;nbsp; Jan &amp;nbsp; &amp;nbsp; 02&lt;BR /&gt;&lt;BR /&gt;And I want to remove the duplicate if the status for ID is Success and Fail while also the month and Day are equal.&lt;BR /&gt;However all other data outside this condition would be unaffected.&lt;BR /&gt;So then my table would look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ID &amp;nbsp;&amp;nbsp; Status &amp;nbsp; Month Day&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 &amp;nbsp; &amp;nbsp;&amp;nbsp; Success &amp;nbsp;&amp;nbsp; Jan &amp;nbsp; &amp;nbsp; 01&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2 &amp;nbsp; &amp;nbsp;&amp;nbsp; Partial &amp;nbsp; &amp;nbsp; &amp;nbsp; Jan &amp;nbsp; &amp;nbsp; 01&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3 &amp;nbsp; &amp;nbsp;&amp;nbsp; Fail &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Jan &amp;nbsp; &amp;nbsp; 01&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3 &amp;nbsp; &amp;nbsp;&amp;nbsp; Success &amp;nbsp;&amp;nbsp; Jan &amp;nbsp; &amp;nbsp; 02&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Does anyone know how to do this?&lt;BR /&gt;&lt;BR /&gt;Any help is much appreciated!&lt;BR /&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:49:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751497#M719882</guid>
      <dc:creator>mckay9999</dc:creator>
      <dc:date>2024-11-15T23:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicates on Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751501#M719883</link>
      <description>&lt;P&gt;HI McKay,&lt;/P&gt;&lt;P&gt;Try like below&lt;/P&gt;&lt;P&gt;Temp:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;ID,Status,Month,Day&lt;BR /&gt;1,Success,Jan,01&lt;BR /&gt;1,Fail,Jan,01&lt;BR /&gt;2,Partial,Jan,01&lt;BR /&gt;3,Fail,Jan,01&lt;BR /&gt;3,Success,Jan,02&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Load * where Peek('RowNo')&amp;lt;&amp;gt;RowNo;&lt;BR /&gt;Load AutoNumber(ID&amp;amp;Month&amp;amp;Day) as RowNo, * Resident Temp&lt;BR /&gt;Order by ID, Month, Day;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 10:10:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751501#M719883</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2020-10-12T10:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicates on Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751504#M719884</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/126618"&gt;@mckay9999&lt;/a&gt;&amp;nbsp; One Option:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Data:
load *,ID&amp;amp;'_'&amp;amp;Month&amp;amp;'_'&amp;amp;Day as IDtmp inline [
ID,Status,Month,Day
1,Success,Jan,01
1,Fail,Jan,01
2,Partial,Jan,01
3,Fail,Jan,01
3,Success,Jan,02
];

output:
noconcatenate

load *,ID&amp;amp;'_'&amp;amp;Month&amp;amp;'_'&amp;amp;Day as Idtmp2 resident Data where Status='Success';

concatenate

load *,ID&amp;amp;'_'&amp;amp;Month&amp;amp;'_'&amp;amp;Day as Idtmp2 resident Data where not Exists(Idtmp2,IDtmp);

drop table Data;
drop fields IDtmp,Idtmp2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 211px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42085i721D0571D3AE7A05/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 10:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751504#M719884</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-10-12T10:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicates on Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751505#M719885</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/126618"&gt;@mckay9999&lt;/a&gt;&amp;nbsp; or:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Data:
load *,ID&amp;amp;'_'&amp;amp;Month&amp;amp;'_'&amp;amp;Day as IDtmp inline [
ID,Status,Month,Day
1,Success,Jan,01
1,Fail,Jan,01
2,Partial,Jan,01
3,Fail,Jan,01
3,Success,Jan,02
];

output:
noconcatenate

load *,ID&amp;amp;'_'&amp;amp;Month&amp;amp;'_'&amp;amp;Day as Idtmp2 resident Data where Match(Status,'Fail')=0;

concatenate

load *,ID&amp;amp;'_'&amp;amp;Month&amp;amp;'_'&amp;amp;Day as Idtmp2 resident Data where not Exists(Idtmp2,IDtmp);

drop table Data;
drop fields IDtmp,Idtmp2;
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Oct 2020 10:17:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751505#M719885</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-10-12T10:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicates on Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751506#M719886</link>
      <description>&lt;P&gt;Hi guys,&lt;BR /&gt;&lt;BR /&gt;Thanks for the quick response - much appreciated.&lt;BR /&gt;&lt;BR /&gt;The data set that I am using has 100s of rows so will the INLINE function work with these potential solutions?&lt;BR /&gt;I had used those 5 rows as a small example&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 10:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751506#M719886</guid>
      <dc:creator>mckay9999</dc:creator>
      <dc:date>2020-10-12T10:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicates on Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751507#M719887</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/126618"&gt;@mckay9999&lt;/a&gt;&amp;nbsp; you can change the Inline by your data and check the solution&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 10:26:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751507#M719887</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-10-12T10:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicates on Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751527#M719888</link>
      <description>&lt;P&gt;HI McKay,&lt;/P&gt;&lt;P&gt;You can use any data source like excel, qvd.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solution is just sample for your verification.&lt;/P&gt;&lt;P&gt;You need to take the logic from community &amp;amp; change accordingly based on your original data.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2020 10:55:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-duplicates-on-Load-Script/m-p/1751527#M719888</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2020-10-12T10:55:21Z</dc:date>
    </item>
  </channel>
</rss>

