<?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 Count distinct numbers and excluding records with Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1689432#M725859</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I am still new to the set analysis and this syntax really drives me crazy &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;from the following table (extract from qvd-file) I want to count all distinct subjids which are no screen failures:&lt;/P&gt;&lt;TABLE border="1" width="56.274007682458375%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;SUBJID&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;ENSTATUS&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;TERMINATION_TYPE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-001&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-002&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-003&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-004&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-005&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-006&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-007&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-008&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-009&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-010&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-001&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-002&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-003&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-004&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-005&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-006&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-007&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-008&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-009&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Counting all premature termination works:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;TERMINATION_TYPE = {'Premature (screen failure)'}&amp;gt;} distinct SUBJID)&lt;/LI-CODE&gt;&lt;P&gt;the other way around I've read would be with -= but this doesn't work and always return 0&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;TERMINATION_TYPE -= {'Premature (screen failure)'}&amp;gt;} distinct SUBJID)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;even more surprisingly to me counting the non-terminated works as expected:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;ENSTATUS -= {'terminated'}&amp;gt;} distinct SUBJID)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, why are the excluded TERMINATION_TYPE records are not counted?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>mlattemann</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Count distinct numbers and excluding records with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1689432#M725859</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I am still new to the set analysis and this syntax really drives me crazy &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;from the following table (extract from qvd-file) I want to count all distinct subjids which are no screen failures:&lt;/P&gt;&lt;TABLE border="1" width="56.274007682458375%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;SUBJID&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;ENSTATUS&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;TERMINATION_TYPE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-001&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-002&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-003&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-004&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-005&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-006&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-007&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-008&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-009&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X004-010&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-001&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-002&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-003&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-004&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-005&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-006&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-007&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-008&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;enrolled&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.261203585147246%" height="25px"&gt;X009-009&lt;/TD&gt;&lt;TD width="19.46222791293214%" height="25px"&gt;terminated&lt;/TD&gt;&lt;TD width="39.30857874519846%" height="25px"&gt;Premature (screen failure)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Counting all premature termination works:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;TERMINATION_TYPE = {'Premature (screen failure)'}&amp;gt;} distinct SUBJID)&lt;/LI-CODE&gt;&lt;P&gt;the other way around I've read would be with -= but this doesn't work and always return 0&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;TERMINATION_TYPE -= {'Premature (screen failure)'}&amp;gt;} distinct SUBJID)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;even more surprisingly to me counting the non-terminated works as expected:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;ENSTATUS -= {'terminated'}&amp;gt;} distinct SUBJID)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, why are the excluded TERMINATION_TYPE records are not counted?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1689432#M725859</guid>
      <dc:creator>mlattemann</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct numbers and excluding records with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1689442#M725860</link>
      <description>&lt;P&gt;There's probably some fancy syntax you could use to make this work, but I recommend changing your load script so the&amp;nbsp;&lt;SPAN&gt;TERMINATION_TYPE all have values. Something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;load&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If(isnull(TERMINATION_TYPE),''No Failure',TERMINATION_TYPE) as&amp;nbsp;TERMINATION_TYPE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Then use set analysis to count&amp;nbsp;&lt;SPAN&gt;TERMINATION_TYPE={'No Failure'}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 13:06:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1689442#M725860</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2020-03-31T13:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct numbers and excluding records with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1689477#M725861</link>
      <description>&lt;P&gt;It is your NULLs that is causing you trouble with SET analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try one of these two.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;=Count({$&amp;lt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;SUBJID = E({&amp;lt;TERMINATION_TYPE ={'Premature (screen failure)'} &amp;gt;}SUBJID)&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;gt;} distinct SUBJID)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;=Count({&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;$-$&amp;lt;TERMINATION_TYPE ={'Premature (screen failure)'}&amp;gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;} distinct SUBJID)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 13:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1689477#M725861</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-03-31T13:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct numbers and excluding records with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1690756#M725862</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;=Count({$&amp;lt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;SUBJID = E({&amp;lt;TERMINATION_TYPE ={'Premature (screen failure)'} &amp;gt;}SUBJID)&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;gt;} distinct SUBJID)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;This seems to work. Thanks a lot. "E" stands for Exclude? As I said before, I am really struggling with the syntax of the set analysis...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 12:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1690756#M725862</guid>
      <dc:creator>mlattemann</dc:creator>
      <dc:date>2020-04-03T12:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct numbers and excluding records with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1690761#M725863</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14139"&gt;@m_woolf&lt;/a&gt;:&lt;/P&gt;&lt;P&gt;well, this would be wrong... The termination type is not "No Failure" they are simply not terminated. The source data contains a lot of conditional answers where a lot of values missing, since these depend on other values. (e.g. in the database the question regarding termination type is disabled until the question Termination is not ticked). If I will need to fill all these missing values with some "dummy" values is a lot of work which then also need to be excluded in other counts.&lt;/P&gt;&lt;P&gt;Nevertheless, your proposed solution is working, though.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 13:00:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1690761#M725863</guid>
      <dc:creator>mlattemann</dc:creator>
      <dc:date>2020-04-03T13:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct numbers and excluding records with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1690777#M725864</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;TERMINATION_TYPE -= {'Premature (screen failure)'}&amp;gt;} distinct SUBJID)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above doesn't work, because most probably your field's other values are NULLs. And nulls in set analysis is not considered to be part of ALL values or '*'. Here minus operator looks for other values &lt;STRONG&gt;except nulls.&lt;/STRONG&gt; Therefore to handle NULL cases like yours, try like:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Count({&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;$&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;-&lt;/STRONG&gt; &amp;lt;TERMINATION_TYPE = {'Premature (screen failure)'}&amp;gt;} distinct SUBJID)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or, you might want to replace '$' with '1' if you want the result ignorant to selections.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 13:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1690777#M725864</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-04-03T13:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct numbers and excluding records with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1690815#M725865</link>
      <description>&lt;P&gt;Yes. You are selecting the SUBJID that are not associated with the 'Premature...' termination type.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 14:45:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-numbers-and-excluding-records-with-Set-Analysis/m-p/1690815#M725865</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-04-03T14:45:00Z</dc:date>
    </item>
  </channel>
</rss>

