<?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: Intersection in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508924#M483591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Buddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have worked out with your first data set..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jun 2013 05:06:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-06-26T05:06:00Z</dc:date>
    <item>
      <title>Intersection in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508920#M483587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my first post on Qlikview community, I usually find the answers to all the questions I have on Qlikview community. I was using set analysis in qlikview and it wasnt giving me the ouptput that i thought it should. Basically, I have a simple table with name and value fiels as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 40%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;Name&lt;/SPAN&gt;&lt;BR /&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;n1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;n1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;n1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;n2&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;n2&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to get the intersection and delta for the field values. That is I want the following:&lt;/P&gt;&lt;P&gt;1. Union: Count of unique values that belong to n1 and n2 together (1, 2, 3, 4) =4&lt;/P&gt;&lt;P&gt;2. Exclusion: Count of unique values that belong to only n1 (1, 2)=2&lt;/P&gt;&lt;P&gt;3. Exclusion: Count of unique values that belong to only n2 (4)=1&lt;/P&gt;&lt;P&gt;4. Intersection: Count of unique values that belong ONLY to to both n1 and n2 (3)=1&lt;/P&gt;&lt;P&gt;5. Symmetric difference: Count of unique values that belong to both n1 and n2, but not to both (1, 2, 4)=3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I uses following set analysis:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13722059076199617" jivemacro_uid="_13722059076199617"&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;1. Count({1&amp;lt;Name={'n1'}&amp;gt; + 1&amp;lt;Name={'n2'}&amp;gt;}DISTINCT Value) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;2. &lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;Count({1&amp;lt;Name={'n1'}&amp;gt; - 1&amp;lt;Name={'n2'}&amp;gt;}DISTINCT Value)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: start; color: #222222; font-size: small; background-color: #ffffff; font-family: arial;"&gt;3. &lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;Count({1&amp;lt;Name={'n2'}&amp;gt; - 1&amp;lt;Name={'n1'}&amp;gt;}DISTINCT Value)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: start; color: #222222; font-size: small; background-color: #ffffff; font-family: arial;"&gt;4. &lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;Count({1&amp;lt;Name={'n1'}&amp;gt; * 1&amp;lt;Name={'n2'}&amp;gt;}DISTINCT Value)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: start; color: #222222; font-size: small; background-color: #ffffff; font-family: arial;"&gt;5. &lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;Count({1&amp;lt;Name={'n1'}&amp;gt; / 1&amp;lt;Name={'n2'}&amp;gt;}DISTINCT Value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I am unable to get any result except the 1st result. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; I am getting the following results&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13722061687293623" jivemacro_uid="_13722061687293623"&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;1. Count({1&amp;lt;Name={'n1'}&amp;gt; + 1&amp;lt;Name={'n2'}&amp;gt;}DISTINCT Value) --&amp;gt; 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;2. &lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;Count({1&amp;lt;Name={'n1'}&amp;gt; - 1&amp;lt;Name={'n2'}&amp;gt;}DISTINCT Value) --&amp;gt; 3&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: start; color: #222222; font-size: small; background-color: #ffffff; font-family: arial;"&gt;3. &lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;Count({1&amp;lt;Name={'n2'}&amp;gt; - 1&amp;lt;Name={'n1'}&amp;gt;}DISTINCT Value) --&amp;gt; 2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: start; color: #222222; font-size: small; background-color: #ffffff; font-family: arial;"&gt;4. &lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;Count({1&amp;lt;Name={'n1'}&amp;gt; * 1&amp;lt;Name={'n2'}&amp;gt;}DISTINCT Value) --&amp;gt; 0&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: start; color: #222222; font-size: small; background-color: #ffffff; font-family: arial;"&gt;5. &lt;SPAN style="color: #222222; font-family: arial; font-size: small; text-align: start; background-color: #ffffff;"&gt;Count({1&amp;lt;Name={'n1'}&amp;gt; / 1&amp;lt;Name={'n2'}&amp;gt;}DISTINCT Value) --&amp;gt; 4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to understand why these operations give misleading results, and what can I do to correct this?&amp;nbsp; &lt;/P&gt;&lt;P&gt;I have attached my qvw file for refernce&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 01:16:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508920#M483587</guid>
      <dc:creator />
      <dc:date>2013-06-26T01:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508921#M483588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to add the FLAG 0 if the value have duplicates to the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 02:07:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508921#M483588</guid>
      <dc:creator />
      <dc:date>2013-06-26T02:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508922#M483589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find the attched qvw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 02:45:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508922#M483589</guid>
      <dc:creator />
      <dc:date>2013-06-26T02:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508923#M483590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you dathu, but in this you are setting the flag by comparing it with the previous value. Its a hack and wont work if the data set is changed. for instance, i changed the data set to add teh following rows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n2, 5&lt;/P&gt;&lt;P&gt;n2, 6&lt;/P&gt;&lt;P&gt;n1, 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it doesnt give the desired result. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;I have attached the qvw file after modifying the dataset..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 04:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508923#M483590</guid>
      <dc:creator />
      <dc:date>2013-06-26T04:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508924#M483591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Buddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have worked out with your first data set..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 05:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508924#M483591</guid>
      <dc:creator />
      <dc:date>2013-06-26T05:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508925#M483592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect!! Thank u so much Karthik &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 05:20:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/508925#M483592</guid>
      <dc:creator />
      <dc:date>2013-06-26T05:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/1679822#M483593</link>
      <description>&lt;P&gt;cant access file as i dont have the qlikview on my system. can you please paste the solution here&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 11:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-in-set-analysis/m-p/1679822#M483593</guid>
      <dc:creator>padales1</dc:creator>
      <dc:date>2020-02-27T11:57:10Z</dc:date>
    </item>
  </channel>
</rss>

