<?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 nulling itself in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-nulling-itself/m-p/175972#M501976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the sample file. Unfortunately, I can't figure out why it's failing. It seems simple, and seems like it should work. I'm probably just missing something. But there's a small chance that it's a bug, and it happens because some programmer thought they were being clever, and that if you selected A and then selected NOT A, that these sets were mutually exclusive, so it doesn't even bother with the sets. And that would be true... IF we were just talking about a single field, but not when we're talking about related data, since in your case, for instance, you have functions that are related both to A and to NOT A, and so should still be in the intersection of the two sets.&lt;/P&gt;&lt;P&gt;The symmetric difference (/) appears to work properly, though, which gives us a workaround, since the whole minus the symmetric difference is the intersection:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;count(distinct funcId) - count({&amp;lt;description*={"*risk*"}&amp;gt; / &amp;lt;description-={"*risk*"}&amp;gt;} distinct funcId)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Jan 2011 00:52:06 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-01-20T00:52:06Z</dc:date>
    <item>
      <title>Set Analysis nulling itself</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-nulling-itself/m-p/175970#M501974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to extract data from two tables for a KPI with:&lt;/P&gt;&lt;P&gt;- funcs may have several stats&lt;/P&gt;&lt;P&gt;- stats may have XPTO on a field (ie.: asda sdXPTO adasd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want those funcs that have at least ONE stats record that contains 'XPTO' AND none that doesn't contain 'XPTO'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SQL it would be something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT distinct&lt;BR /&gt;f.num_seq from func f, status s&lt;BR /&gt;where&lt;BR /&gt;f.funcid = s.funcid&lt;BR /&gt;and&lt;BR /&gt;f.func = 'ABC'&lt;BR /&gt;and num_seq in (&lt;BR /&gt;SELECT&lt;BR /&gt;f.num_seq from func f, status s&lt;BR /&gt;where&lt;BR /&gt;f.funcid = s.funcid&lt;BR /&gt;and&lt;BR /&gt;f.func = '1A.1.1.1.10.3.5.3.'&lt;BR /&gt;and s.spec like '*XPTO*'&lt;BR /&gt;)&lt;BR /&gt;and num_seq not in (&lt;BR /&gt;SELECT&lt;BR /&gt;f.num_seq from func f, status s&lt;BR /&gt;where&lt;BR /&gt;f.funcid = s.funcid&lt;BR /&gt;and&lt;BR /&gt;f.func = '1A.1.1.1.10.3.5.3.'&lt;BR /&gt;and s.spec not like '*XPTO*'&lt;BR /&gt;)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying with Set Analysis with this:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;{$&amp;lt;SPEC={'*XPTO*'}&amp;gt;-&amp;lt;~SPEC={'*XPTO*'}&amp;gt;}&lt;/P&gt;&lt;P&gt;But apparently the two sets are nulling each other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 18:57:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-nulling-itself/m-p/175970#M501974</guid>
      <dc:creator />
      <dc:date>2011-01-19T18:57:07Z</dc:date>
    </item>
    <item>
      <title>Set Analysis nulling itself</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-nulling-itself/m-p/175971#M501975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So here's some more information and an example that might help you to help me :).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've made a file that has just some minor info but that allows me to do the tests that I need. The file is attatched to this reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that all the combination operators are working like they showld except for the one that i need in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to have a count of the Funcs tha have booth a stat with risk and another one without risk, but it simply isn't working. The value that showld be showing in the * column showld be 2 but it's allways 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody help please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 23:08:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-nulling-itself/m-p/175971#M501975</guid>
      <dc:creator />
      <dc:date>2011-01-19T23:08:01Z</dc:date>
    </item>
    <item>
      <title>Set Analysis nulling itself</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-nulling-itself/m-p/175972#M501976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the sample file. Unfortunately, I can't figure out why it's failing. It seems simple, and seems like it should work. I'm probably just missing something. But there's a small chance that it's a bug, and it happens because some programmer thought they were being clever, and that if you selected A and then selected NOT A, that these sets were mutually exclusive, so it doesn't even bother with the sets. And that would be true... IF we were just talking about a single field, but not when we're talking about related data, since in your case, for instance, you have functions that are related both to A and to NOT A, and so should still be in the intersection of the two sets.&lt;/P&gt;&lt;P&gt;The symmetric difference (/) appears to work properly, though, which gives us a workaround, since the whole minus the symmetric difference is the intersection:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;count(distinct funcId) - count({&amp;lt;description*={"*risk*"}&amp;gt; / &amp;lt;description-={"*risk*"}&amp;gt;} distinct funcId)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 00:52:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-nulling-itself/m-p/175972#M501976</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-01-20T00:52:06Z</dc:date>
    </item>
  </channel>
</rss>

