<?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 Set Analysis for getting the Minus count for two values! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-getting-the-Minus-count-for-two-values/m-p/297975#M1183978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count({$&amp;lt;TKT_TYPE = {'ETK', 'TKT'}, TKT_TYPE -= {'CRN'}&amp;gt;} DISTINCT TICKET)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will show a red line under the -= as if there is an error but should work and will exclude the CRN from that count&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Dec 2011 00:18:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-12-17T00:18:46Z</dc:date>
    <item>
      <title>Set Analysis for getting the Minus count for two values!</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-getting-the-Minus-count-for-two-values/m-p/297974#M1183977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Members,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone will help with writing the Set Analysis for getting the Minus count for two values! Suppose I have two&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(OW_RT = 'OW' and Ticket_status_name &amp;lt;&amp;gt; 'Cancelled' or Ticket_status_name &amp;lt;&amp;gt; 'Failed' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; and COMP = '19',count({$&amp;lt;TKT_TYPE={'ETK','TKT'}&amp;gt; }DISTINCT TICKET)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the count ({$&amp;lt;TKT_TYPE={'ETK','TKT'}&amp;gt; }-I want to deduct the TKT_TYPE={'CRN'}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me how can we do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SIva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 07:01:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-getting-the-Minus-count-for-two-values/m-p/297974#M1183977</guid>
      <dc:creator>siva_boggarapu</dc:creator>
      <dc:date>2011-12-14T07:01:59Z</dc:date>
    </item>
    <item>
      <title>Set Analysis for getting the Minus count for two values!</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-getting-the-Minus-count-for-two-values/m-p/297975#M1183978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count({$&amp;lt;TKT_TYPE = {'ETK', 'TKT'}, TKT_TYPE -= {'CRN'}&amp;gt;} DISTINCT TICKET)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will show a red line under the -= as if there is an error but should work and will exclude the CRN from that count&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Dec 2011 00:18:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-getting-the-Minus-count-for-two-values/m-p/297975#M1183978</guid>
      <dc:creator />
      <dc:date>2011-12-17T00:18:46Z</dc:date>
    </item>
    <item>
      <title>Set Analysis for getting the Minus count for two values!</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-for-getting-the-Minus-count-for-two-values/m-p/297976#M1183979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also not sure if I understood, I assume you want to count the tickets of type ETK or TKT and then deduct the the count of tickets of type CRN:&lt;/P&gt;&lt;P&gt;count({$&amp;lt;TKT_TYPE = {'ETK','TKT'}&amp;gt;} DISTINCT TICKET ) - count({$&amp;lt;TKT_TYPE = {'CRN'}&amp;gt;}DISTINCT TICKET )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe this is different from just creating a selection in TKT_TYPE with values ETK and TKT, removing CRN from that selection, and then count the TICKETS associated to this set (I do believe you actually don't need the TKT_TYPE -= {'CRN'} part in the set expression, since this set element value is implicitely excluded with the first set element anyway).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say you have 9 balls, 3 red, 3 green, 3 yellow, with distinct ball number. My above expression will return count( Red + green balls) = 6 and deduct 3 yellow balls, so you get a result of three. While I see no way to create one single&amp;nbsp; set that will result in the difference of the count of two sets with out actually performing the counts (e.g. I think the result of zack.lore's expression in my example would be 6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But maybe I just don't understand your setting or requirement correctly, so please just comment on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Dec 2011 13:22:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-for-getting-the-Minus-count-for-two-values/m-p/297976#M1183979</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-17T13:22:37Z</dc:date>
    </item>
  </channel>
</rss>

