<?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: Conditional Filter in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624145#M733975</link>
    <description>&lt;P&gt;Hello David&lt;/P&gt;&lt;P&gt;Thanks for replying.&lt;/P&gt;&lt;P&gt;Need to remove only the ones which are Cancelled and Retained.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Chintan Gala&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2019 11:13:32 GMT</pubDate>
    <dc:creator>chintan1989</dc:creator>
    <dc:date>2019-09-16T11:13:32Z</dc:date>
    <item>
      <title>Conditional Filter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624105#M733972</link>
      <description>&lt;P&gt;Hi Friends&lt;/P&gt;&lt;P&gt;I have 2 columns -&amp;nbsp; ID and Status.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For any ID's which are repeating and also having Status ='Completed' or 'Retained'&amp;nbsp; , need to be removed.&lt;/P&gt;&lt;P&gt;Example: In attached Excel,&amp;nbsp; ID =1 and ID=45&amp;nbsp; is satisfying above condition and should be removed.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to handle in scripting part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Chintan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624105#M733972</guid>
      <dc:creator>chintan1989</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Filter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624124#M733973</link>
      <description>&lt;P&gt;ID29 has statuses 'Completed' and 'Cancelled' - that one should not be removed? In that case, the condition you're looking for should be:&lt;/P&gt;&lt;P&gt;For any ID's which are repeating and also having Status ='Completed' &lt;STRONG&gt;AND&lt;/STRONG&gt; 'Retained'&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;EM&gt;EDIT:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If this is true you need to do it in couple of steps:&lt;/P&gt;&lt;P&gt;A:&lt;BR /&gt;LOAD&lt;BR /&gt;ID,&lt;BR /&gt;Status&lt;BR /&gt;FROM [lib://dt/Test_Logic.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Left Join (A)&lt;BR /&gt;LOAD&lt;BR /&gt;ID,&lt;BR /&gt;count(distinct(Status)) as idc&lt;BR /&gt;Resident A&lt;BR /&gt;Group by ID&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Now you identified those ID's which have more than 1 status. If you need to remove those which have 'Completed' &lt;STRONG&gt;AND&lt;/STRONG&gt; 'Retained' but keep with status 'Cancelled' you need to do this:&lt;/P&gt;&lt;P&gt;B:&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;Status&lt;BR /&gt;Resident A&lt;BR /&gt;Where idc=1;&lt;/P&gt;&lt;P&gt;First you load those which have only 1 ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outer join (B)&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;Status&lt;BR /&gt;Resident A&lt;BR /&gt;Where Status='Cancelled' and idc&amp;gt;1;&lt;BR /&gt;Drop Table A;&lt;/P&gt;&lt;P&gt;Now you join those with two ID's but one of those has status 'Cancelled' (note: it will join with Status cancelled and only one line). If you need to remove all with more than one status you don't need the second part, you can do it with inner join and where idc=1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 10:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624124#M733973</guid>
      <dc:creator>DavidM</dc:creator>
      <dc:date>2019-09-16T10:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Filter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624130#M733974</link>
      <description>&lt;P&gt;maybe someting as below:&lt;/P&gt;&lt;P&gt;tab:&lt;BR /&gt;LOAD&lt;BR /&gt;*&lt;BR /&gt;where ret &amp;gt; 1;&lt;BR /&gt;LOAD&lt;BR /&gt;ID,&lt;BR /&gt;count(Status) as ret&lt;BR /&gt;from ............&lt;BR /&gt;where ( Status = 'Completed' or Status = 'Retained' )&lt;BR /&gt;group by ID;&lt;/P&gt;&lt;P&gt;I hope it can helps.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 10:44:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624130#M733974</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2019-09-16T10:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Filter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624145#M733975</link>
      <description>&lt;P&gt;Hello David&lt;/P&gt;&lt;P&gt;Thanks for replying.&lt;/P&gt;&lt;P&gt;Need to remove only the ones which are Cancelled and Retained.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Chintan Gala&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 11:13:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624145#M733975</guid>
      <dc:creator>chintan1989</dc:creator>
      <dc:date>2019-09-16T11:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Filter in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624149#M733976</link>
      <description>&lt;P&gt;Thanks David, its working fine.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 11:36:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Filter-in-Script/m-p/1624149#M733976</guid>
      <dc:creator>chintan1989</dc:creator>
      <dc:date>2019-09-16T11:36:09Z</dc:date>
    </item>
  </channel>
</rss>

