<?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 How to remove records per ID in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-remove-records-per-ID/m-p/1703203#M724888</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to remove certain records from my result set based on a certain criteria, but due to how the data is it is becoming difficult.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;TABLE width="195"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="90"&gt;Opportunity#&lt;/TD&gt;&lt;TD width="105"&gt;ManufacturerID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2558&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2558&lt;/TD&gt;&lt;TD&gt;588&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;230&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example above, I would like to remove the record with opportunity# 2558 and ManufacturerID of -1.&amp;nbsp; Simply telling Qlikview to remove any ManufacturerID with -1 won't work because there are Opportunities that have only one record (with a manufacturerID of -1) and we want to keep those.&lt;/P&gt;&lt;P&gt;Basically, any Opportunity that returns more than one record of ManufacturerIDs I would like to remove the -1 records, however if there is only one record for the Opportunity keep that one record.&lt;/P&gt;&lt;P&gt;In addition, this needs to be done via the loadscript because I am storing the data into a .txt file for SQL to grab.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 18:37:26 GMT</pubDate>
    <dc:creator>PresidReporting</dc:creator>
    <dc:date>2024-11-16T18:37:26Z</dc:date>
    <item>
      <title>How to remove records per ID</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-records-per-ID/m-p/1703203#M724888</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to remove certain records from my result set based on a certain criteria, but due to how the data is it is becoming difficult.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;TABLE width="195"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="90"&gt;Opportunity#&lt;/TD&gt;&lt;TD width="105"&gt;ManufacturerID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2558&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2558&lt;/TD&gt;&lt;TD&gt;588&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;230&lt;/TD&gt;&lt;TD&gt;-1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example above, I would like to remove the record with opportunity# 2558 and ManufacturerID of -1.&amp;nbsp; Simply telling Qlikview to remove any ManufacturerID with -1 won't work because there are Opportunities that have only one record (with a manufacturerID of -1) and we want to keep those.&lt;/P&gt;&lt;P&gt;Basically, any Opportunity that returns more than one record of ManufacturerIDs I would like to remove the -1 records, however if there is only one record for the Opportunity keep that one record.&lt;/P&gt;&lt;P&gt;In addition, this needs to be done via the loadscript because I am storing the data into a .txt file for SQL to grab.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:37:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-records-per-ID/m-p/1703203#M724888</guid>
      <dc:creator>PresidReporting</dc:creator>
      <dc:date>2024-11-16T18:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove records per ID</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-records-per-ID/m-p/1703208#M724889</link>
      <description>&lt;P&gt;Solution in the Script:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;tab1:
LOAD * INLINE [
    Opportunity#, ManufacturerID
    2558, -1
    2558, 588
    230, -1
    231, 213
    231, 211
];

Left Join(tab1)
LOAD Opportunity#, Count(Opportunity#) As Cnt
Resident tab1
Group By Opportunity#
;

tab2:
NoConcatenate
LOAD *
Resident tab1
Where Cnt=1 OR (Cnt&amp;gt;1 And ManufacturerID&amp;lt;&amp;gt;-1)
;
Drop Table tab1;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 18 May 2020 19:28:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-records-per-ID/m-p/1703208#M724889</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-05-18T19:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove records per ID</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-records-per-ID/m-p/1703213#M724890</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV58.PNG" style="width: 199px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33899iA5F4B64E869705AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV58.PNG" alt="commQV58.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 19:29:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-records-per-ID/m-p/1703213#M724890</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-05-18T19:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove records per ID</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-remove-records-per-ID/m-p/1703290#M724891</link>
      <description>&lt;P&gt;This might help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Opportunity# as _opp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;From Data&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where&amp;nbsp;&lt;SPAN&gt;ManufacturerID &amp;lt;&amp;gt; -1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Concatenate load *&lt;/P&gt;&lt;P&gt;From Data&lt;/P&gt;&lt;P&gt;Where&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not Exists(Opportunity# , _opp)&lt;/P&gt;&lt;P&gt;And&amp;nbsp;&lt;SPAN&gt;ManufacturerID =-1 ; //not necessary&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Drop field _opp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 04:46:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-remove-records-per-ID/m-p/1703290#M724891</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-05-19T04:46:09Z</dc:date>
    </item>
  </channel>
</rss>

