<?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 Deleting row if value in column only appears once in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Deleting-row-if-value-in-column-only-appears-once/m-p/1929783#M1218926</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;I'm new to Qlik so apologies in advance if I explain things unclearly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a table and I want to remove a whole row based on if the value of a specific column appears only once. I know that I can "drop" rows (or rather not select them) based on column value with&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Where [fieldname] &amp;lt;&amp;gt; '0'&amp;nbsp;&lt;/STRONG&gt;(selects only values where the column value is not zero)&lt;/P&gt;
&lt;P&gt;but I don't know how to do this with column value count. Is there a way to do this?&lt;/P&gt;
&lt;P&gt;I also know from another post that I can count if a value appears only once in a column with&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT{&amp;lt;Value = {"=Count(Value) = 1"}&amp;gt;}Value)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Is this maybe useful?&lt;/P&gt;</description>
    <pubDate>Thu, 12 May 2022 11:56:22 GMT</pubDate>
    <dc:creator>ihuynhi</dc:creator>
    <dc:date>2022-05-12T11:56:22Z</dc:date>
    <item>
      <title>Deleting row if value in column only appears once</title>
      <link>https://community.qlik.com/t5/QlikView/Deleting-row-if-value-in-column-only-appears-once/m-p/1929783#M1218926</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;I'm new to Qlik so apologies in advance if I explain things unclearly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a table and I want to remove a whole row based on if the value of a specific column appears only once. I know that I can "drop" rows (or rather not select them) based on column value with&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Where [fieldname] &amp;lt;&amp;gt; '0'&amp;nbsp;&lt;/STRONG&gt;(selects only values where the column value is not zero)&lt;/P&gt;
&lt;P&gt;but I don't know how to do this with column value count. Is there a way to do this?&lt;/P&gt;
&lt;P&gt;I also know from another post that I can count if a value appears only once in a column with&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT{&amp;lt;Value = {"=Count(Value) = 1"}&amp;gt;}Value)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Is this maybe useful?&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 11:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Deleting-row-if-value-in-column-only-appears-once/m-p/1929783#M1218926</guid>
      <dc:creator>ihuynhi</dc:creator>
      <dc:date>2022-05-12T11:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting row if value in column only appears once</title>
      <link>https://community.qlik.com/t5/QlikView/Deleting-row-if-value-in-column-only-appears-once/m-p/1930755#M1218963</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can remove lines that appear only once, in the script part or in your UI objects.&lt;/P&gt;
&lt;P&gt;Script:&lt;/P&gt;
&lt;P&gt;First, you should count a number of values in this column in a separate table, then leave values that meet your condition (NumOfID &amp;gt; 1)&amp;nbsp; and join (inner join) them to the main table, see the example below&lt;/P&gt;
&lt;P&gt;//Source Table&lt;/P&gt;
&lt;P&gt;DATA_TMP:&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt; * Inline [&lt;BR /&gt;BusinessEntityID, OrderDate, earningsPerSale, Model&lt;BR /&gt;1, 05-12-2022, 50, A&lt;BR /&gt;2, 05-12-2021, 60, A&lt;BR /&gt;2, 05-13-2021, 70, B&lt;BR /&gt;2, 05-14-2021, 90, C&lt;BR /&gt;3, 05-12-2023, 15, C&lt;BR /&gt;3, 05-13-2023, 550, D&lt;BR /&gt;5, 05-14-2020, 150, E&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Inner Join(DATA_TMP) // Join to data source to leave&amp;nbsp;BusinessEntityID that appears more than one time&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BusinessEntityID&lt;BR /&gt;Where NumOfID &amp;gt; 1; //Load&amp;nbsp;BusinessEntityID that appears more than 1 time in table&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BusinessEntityID,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(BusinessEntityID) AS NumOfID //Count number of BusinessEntityID&lt;BR /&gt;Resident DATA_TMP&lt;BR /&gt;Group By BusinessEntityID;&lt;/P&gt;
&lt;P&gt;Before Join (ID 1 and ID 5 appear only once in the table):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vchuprina_0-1652617458929.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79450iCD4F3BF37EBD5E57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vchuprina_0-1652617458929.png" alt="vchuprina_0-1652617458929.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;After Join:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vchuprina_1-1652617516006.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79451iC48EF272920CFFC3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vchuprina_1-1652617516006.png" alt="vchuprina_1-1652617516006.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;UI solution (Set Analysis)&lt;/P&gt;
&lt;P&gt;If you don't want to remove IDs that appear only once in your table from the application you can filter them on UI with Set Analysis.&lt;/P&gt;
&lt;P&gt;Instead of Sum(earningsPerSale) I use&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SUM({&amp;lt;BusinessEntityID = {"=Count(BusinessEntityID)&amp;gt;1"}&amp;gt;}earningsPerSale)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vchuprina_2-1652617892221.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79452iCB030E0A6DD8D830/image-size/large?v=v2&amp;amp;px=999" role="button" title="vchuprina_2-1652617892221.png" alt="vchuprina_2-1652617892221.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vitalii&lt;/P&gt;</description>
      <pubDate>Sun, 15 May 2022 12:38:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Deleting-row-if-value-in-column-only-appears-once/m-p/1930755#M1218963</guid>
      <dc:creator>vchuprina</dc:creator>
      <dc:date>2022-05-15T12:38:47Z</dc:date>
    </item>
  </channel>
</rss>

