<?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 Conditional count with OR in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-count-with-OR/m-p/611374#M477864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the correct syntax to count instances of two filters using an OR?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I need to count:&lt;/P&gt;&lt;P&gt;Count ( {&amp;lt;BLOB={'&amp;gt;0'}&amp;gt;} DISTINCT DeviceID ) + Count ( {&amp;lt;FOO={'&amp;gt;0'}&amp;gt;} DISTINCT DeviceID ), but then their might be repeated DeviceID's for devices that have both BLOB and FOO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, looking for something like this:&lt;/P&gt;&lt;P&gt;Count ( {&amp;lt;BLOB={'&amp;gt;0'} or FOO={'&amp;gt;0'} &amp;gt;} DISTINCT DeviceID )&lt;/P&gt;&lt;P&gt;Count ( {&amp;lt;BLOB={'&amp;gt;0'} || FOO={'&amp;gt;0'} &amp;gt;} DISTINCT DeviceID )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Apr 2014 19:36:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-07T19:36:00Z</dc:date>
    <item>
      <title>Conditional count with OR</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-count-with-OR/m-p/611374#M477864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the correct syntax to count instances of two filters using an OR?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I need to count:&lt;/P&gt;&lt;P&gt;Count ( {&amp;lt;BLOB={'&amp;gt;0'}&amp;gt;} DISTINCT DeviceID ) + Count ( {&amp;lt;FOO={'&amp;gt;0'}&amp;gt;} DISTINCT DeviceID ), but then their might be repeated DeviceID's for devices that have both BLOB and FOO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, looking for something like this:&lt;/P&gt;&lt;P&gt;Count ( {&amp;lt;BLOB={'&amp;gt;0'} or FOO={'&amp;gt;0'} &amp;gt;} DISTINCT DeviceID )&lt;/P&gt;&lt;P&gt;Count ( {&amp;lt;BLOB={'&amp;gt;0'} || FOO={'&amp;gt;0'} &amp;gt;} DISTINCT DeviceID )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 19:36:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-count-with-OR/m-p/611374#M477864</guid>
      <dc:creator />
      <dc:date>2014-04-07T19:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional count with OR</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-count-with-OR/m-p/611375#M477865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jessica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count ( {&amp;lt;BLOB={'&amp;gt;0'} + FOO={'&amp;gt;0'}&amp;gt;} DISTINCT DeviceID )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;best regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 19:39:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-count-with-OR/m-p/611375#M477865</guid>
      <dc:creator />
      <dc:date>2014-04-07T19:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional count with OR</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-count-with-OR/m-p/611376#M477866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Count ({&amp;lt;BLOB={'&amp;gt;0'}&amp;gt;+&amp;lt;FOO={'&amp;gt;0'}&amp;gt;} DISTINCT DeviceID )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From QV Help:&lt;/P&gt;&lt;H2&gt;Set Operators&lt;/H2&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Several set operators that can be used in set expressions exist. All set operators use sets as operands, as described above, and return a set as result.&lt;/P&gt;
&lt;P&gt;+ Union. This binary operation returns a set consisting of the records that belong to any of the two set operands.&lt;/P&gt;
&lt;P&gt;- Exclusion. This binary operation returns a set of the records that belong to the first but not the other of the two set operands. Also, when used as a unary operator, it returns the complement set.&lt;/P&gt;
&lt;P&gt;* Intersection. This binary operation returns a set consisting of the records that belong to both of the two set operands.&lt;/P&gt;
&lt;P&gt;/ Symmetric difference (XOR). This binary operation returns a set consisting of the records that belong to either, but not both of the two set operands.&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 19:39:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-count-with-OR/m-p/611376#M477866</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-04-07T19:39:40Z</dc:date>
    </item>
  </channel>
</rss>

