<?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: Remove duplicate rows based on the highest value in another field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Remove-duplicate-rows-based-on-the-highest-value-in-another/m-p/12988#M2135</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; search Id, postal code, latitude, longitude, longitude and latitude, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2864, NL|1717KK, "51,55811332", "5,096711236", 5155850967, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2572, NL|8888TN, "50,87629953", "5,979115693", 5087659791&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 53, NL|7777RD, "51,83133474", "5,810670978", 5183158106, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 53, NL|7777RD, "51,83321971", "5,813177268", 5183358131, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1047, NL|2323MD, "51,06767516", "5,853132061", 5106758531&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Right Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD [search Id],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; [postal code],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; Max([longitude and latitude]) as [longitude and latitude]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Group By [search Id], [postal code];&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2018 13:01:49 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-06-12T13:01:49Z</dc:date>
    <item>
      <title>Remove duplicate rows based on the highest value in another field</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-duplicate-rows-based-on-the-highest-value-in-another/m-p/12986#M2133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset that contains patient data and its postcodes. The geographical coordinates are extracted from another table with postal code and coordinates data. By joining the tables together, there are some postal codes that has 2 or more possible latitude and longitude coordinates. My goal is to only keep the records that has the highest value in the field 'longitude and latitude'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 921px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="18" width="90"&gt;search Id&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="164"&gt;postal code&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="71"&gt;latitude&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="71"&gt;longitude&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="134"&gt;longitude and latitude&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="45"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="18" style="border-top: none;"&gt;2864&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;NL|1717KK&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;51,55811332&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5,096711236&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5155850967&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="18" style="border-top: none;"&gt;2572&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;NL|8888TN&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;50,87629953&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5,979115693&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5087659791&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="18" style="border-top: none;"&gt;53&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;NL|7777RD&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;51,83133474&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5,810670978&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5183158106&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="18" style="border-top: none;"&gt;53&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;NL|7777RD&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;51,83321971&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5,813177268&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5183358131&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="18" style="border-top: none;"&gt;1047&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;NL|2323MD&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;51,06767516&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5,853132061&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5106758531&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the field 'longitude and latitude' as a combination of the fields 'latitude' and 'longitude' to use as a value to determine a max.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I process the data to remove only the row &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 921px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl64" height="18" style="border-top: none;"&gt;53&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;NL|7777RD&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;51,83133474&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5,810670978&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5183158106&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;that has the lowest value and keep the one with the highest value? The method also needs to work if there are 3 of more rows with same search Id and if double search Id's have the same longitude and latitude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using DISTINCT while loading does't make sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This data isn't real to keep the original data private.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:50:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-duplicate-rows-based-on-the-highest-value-in-another/m-p/12986#M2133</guid>
      <dc:creator>qlikmark1990</dc:creator>
      <dc:date>2018-06-12T12:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate rows based on the highest value in another field</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-duplicate-rows-based-on-the-highest-value-in-another/m-p/12987#M2134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&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 [search Id],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [postal code],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; latitude,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; longitude,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [longitude and latitude]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM ...;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Right Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;SPAN style="font-size: 10pt;"&gt;[search Id],&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [postal code],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max([longitude and latitude]) as [longitude and latitude]&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;Group By &lt;SPAN style="font-size: 10pt;"&gt;[search Id], &lt;/SPAN&gt;[postal code];&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:53:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-duplicate-rows-based-on-the-highest-value-in-another/m-p/12987#M2134</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-12T12:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate rows based on the highest value in another field</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-duplicate-rows-based-on-the-highest-value-in-another/m-p/12988#M2135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a sample script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; search Id, postal code, latitude, longitude, longitude and latitude, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2864, NL|1717KK, "51,55811332", "5,096711236", 5155850967, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2572, NL|8888TN, "50,87629953", "5,979115693", 5087659791&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 53, NL|7777RD, "51,83133474", "5,810670978", 5183158106, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 53, NL|7777RD, "51,83321971", "5,813177268", 5183358131, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1047, NL|2323MD, "51,06767516", "5,853132061", 5106758531&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Right Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;LOAD [search Id],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; [postal code],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt; Max([longitude and latitude]) as [longitude and latitude]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Group By [search Id], [postal code];&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:01:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-duplicate-rows-based-on-the-highest-value-in-another/m-p/12988#M2135</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-12T13:01:49Z</dc:date>
    </item>
  </channel>
</rss>

