<?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 Removing duplicate rows in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499035#M102942</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;In sql I can give each row by customer and I'd or sequence number using row number along with partition as per below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2024_1221_162540.png" style="width: 1079px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175984i68B9A45E8BF9BAEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot_2024_1221_162540.png" alt="Screenshot_2024_1221_162540.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This way I can keep the rows where rn = 1&lt;/P&gt;
&lt;P&gt;Is there a way similar to this in Qlik while I'm reading data from a qvd file?&lt;/P&gt;
&lt;P&gt;I thought of sorting data by customer an date desc then using previous(customer) I can identify the first row of each customer and thus add a flag to that row as 1&lt;/P&gt;
&lt;P&gt;Then. I filter in the rows where this flag is 1&lt;/P&gt;
&lt;P&gt;Kindly advise&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Sat, 21 Dec 2024 14:34:09 GMT</pubDate>
    <dc:creator>ali_hijazi</dc:creator>
    <dc:date>2024-12-21T14:34:09Z</dc:date>
    <item>
      <title>Removing duplicate rows</title>
      <link>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499035#M102942</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;In sql I can give each row by customer and I'd or sequence number using row number along with partition as per below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2024_1221_162540.png" style="width: 1079px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175984i68B9A45E8BF9BAEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot_2024_1221_162540.png" alt="Screenshot_2024_1221_162540.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This way I can keep the rows where rn = 1&lt;/P&gt;
&lt;P&gt;Is there a way similar to this in Qlik while I'm reading data from a qvd file?&lt;/P&gt;
&lt;P&gt;I thought of sorting data by customer an date desc then using previous(customer) I can identify the first row of each customer and thus add a flag to that row as 1&lt;/P&gt;
&lt;P&gt;Then. I filter in the rows where this flag is 1&lt;/P&gt;
&lt;P&gt;Kindly advise&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Sat, 21 Dec 2024 14:34:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499035#M102942</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2024-12-21T14:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicate rows</title>
      <link>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499042#M102943</link>
      <description>&lt;P&gt;Hey ,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Simple answer is you can just use &lt;STRONG&gt;RowNo()&lt;/STRONG&gt;&amp;nbsp;function to get the Row Number .&lt;/P&gt;
&lt;P&gt;For your requirement :&lt;/P&gt;
&lt;P&gt;1. Load your Qvd file as a whole :&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LOAD * FROM "XYZ.QVD";&lt;/P&gt;
&lt;P&gt;2. LOAD the data using &lt;STRONG&gt;Resident&amp;nbsp;&lt;/STRONG&gt;of previous table and use&amp;nbsp;&lt;STRONG&gt;Order by Order_Date Desc.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;B:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; LOAD customer_id,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;order_id,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RowNo() as rn&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Resident A&amp;nbsp; Order by Order_Date Desc;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Drop Table A;&lt;/P&gt;
&lt;P&gt;3. Then you can just add preceding load or one more resident load to get your data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;NoConcatenate&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;C:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Load *&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Resident B&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;where rn = 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Drop Table B&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Dec 2024 15:39:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499042#M102943</guid>
      <dc:creator>Koustav</dc:creator>
      <dc:date>2024-12-21T15:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicate rows</title>
      <link>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499045#M102945</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/216"&gt;@ali_hijazi&lt;/a&gt;&amp;nbsp;&amp;nbsp;Please check Qlik Help :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/CounterFunctions/RowNo.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/CounterFunctions/RowNo.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Dec 2024 15:42:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499045#M102945</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2024-12-21T15:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicate rows</title>
      <link>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499049#M102949</link>
      <description>&lt;P&gt;Use RecNo() as SNo, Main Difference between recNo() and Rown() is Recno() acts while the&amp;nbsp; Loading the Table while Rowno() acts on already Loaded table.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Dec 2024 21:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499049#M102949</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2024-12-21T21:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicate rows</title>
      <link>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499140#M102957</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/216"&gt;@ali_hijazi&lt;/a&gt;&amp;nbsp; try below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Data:
LOAD *
FROM table;

T1:
LOAD *,
if(customer_id&amp;lt;&amp;gt;previous(customer_id),1,rangesum(peek('rn'),1)) as rn
resident Data
order by customer_id,order_date desc;

drop table Data;

Final:
noconcatenate
LOAD *
resident T1
where rn=1;

drop table T1;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 11:15:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499140#M102957</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-12-23T11:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Removing duplicate rows</title>
      <link>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499141#M102958</link>
      <description>&lt;P&gt;another option:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Data:
LOAD customer_id,
     order_id,
     order_date
FROM table;

inner join(Data)
LOAD customer_id,
     max(order_date) as order_date
resident data
group by customer_id;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 23 Dec 2024 11:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Removing-duplicate-rows/m-p/2499141#M102958</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-12-23T11:15:07Z</dc:date>
    </item>
  </channel>
</rss>

