<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/317292#M117034</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Daniel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2011 07:45:31 GMT</pubDate>
    <dc:creator>rnepla83</dc:creator>
    <dc:date>2011-08-01T07:45:31Z</dc:date>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/317290#M117032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use the "Set Analysis" &lt;SPAN style="font-size: 12px; text-decoration: underline;"&gt;operator&lt;/SPAN&gt; with &lt;SPAN style="font-size: 12px; text-decoration: underline;"&gt;Bookmarks&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;I have two bookmarks called Set1 and Set2. &lt;/P&gt;&lt;P&gt;In these bookmarks there are the results of two different selections, for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 12px; color: #800000;"&gt;Set1 &lt;/SPAN&gt;= Selection of product '&lt;STRONG style="font-size: 12px; color: #ff0000;"&gt;A&lt;/STRONG&gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 12px; color: #800000;"&gt;Set2 &lt;/SPAN&gt;= Selection of product '&lt;SPAN style="font-size: 12px; color: #ff0000;"&gt;&lt;STRONG style="font-size: 12px;"&gt;B&lt;/STRONG&gt;&lt;/SPAN&gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two results sets are supposed to have some common records (customers who bought&lt;SPAN style="font-size: 12px; color: #333333; text-decoration: underline;"&gt;both&lt;/SPAN&gt; 'A' &lt;SPAN style="font-size: 12px; text-decoration: underline;"&gt;and&lt;/SPAN&gt; 'B').&lt;/P&gt;&lt;P&gt;I loaded the data of who bought the product (&lt;STRONG style="font-size: 12px;"&gt;clients&lt;/STRONG&gt;) and obvious the &lt;STRONG style="font-size: 12px;"&gt;product&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the results I expect to get from each operator:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;- Set1 + Set2 (union)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;All customers who bought 'A' and all customers who bought 'B'. Duplicated records should be excluded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;- Set1 - Set2 (difference)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;All customers who bought 'A' and NOT have bought 'B'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;- Set1 * Set2 (intersection)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Customers who bought &lt;SPAN style="font-size: 12px; color: #333333; text-decoration: underline;"&gt;both&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; color: #333333;"&gt; 'A'&lt;/SPAN&gt; &lt;SPAN style="font-size: 12px; text-decoration: underline;"&gt;and&lt;/SPAN&gt; 'B'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;- Set1 / Set2 (XOR)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Customers who bought 'A' XOR 'B' (customers who bought both the models are excluded).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;I&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;tried to use&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;these formulas for the union (&lt;/SPAN&gt;&lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;The&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;same&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;formula was&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;used&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;for the other operators *, -, xor&lt;/SPAN&gt;&lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;" title="Click for alternate translations"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;" title="Click for alternate translations"&gt;1) =&lt;STRONG style="font-size: 12px;"&gt;count&lt;/STRONG&gt;({&amp;lt;CLIENT=p({Set1}) + p({Set2})&amp;gt;}&amp;nbsp; DISTINCT &lt;STRONG style="font-size: 12px;"&gt;CLIENT&lt;/STRONG&gt;) &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2) =&lt;STRONG style="font-size: 12px;"&gt;count&lt;/STRONG&gt;({Set1 + Set2}&amp;nbsp; DISTINCT &lt;STRONG style="font-size: 12px;"&gt;CLIENT&lt;/STRONG&gt;)&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt;"&gt;&lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;but in both&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;cases&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;the results&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;aren't&lt;/SPAN&gt; &lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt;"&gt;&lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;&lt;IMG alt="Immagine.png" class="jive-image-thumbnail jive-image" height="281" onclick="" src="https://community.qlik.com/legacyfs/online/6191_Immagine.png" style="width: 607px; height: 281.91777777777776px;" width="607" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt;"&gt;&lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;FOR EXAMPLE (look the image): If in the Set1 there are the products: 1,2,3,4,5,6 and in the Set2 there are the products 2,6,7,8, i would like to know all the clients have bought both products (if i analyze the intersection case). The intersection of Set1 and Set2 is {2}, but {2} is the intersection of all the bookmark. I want to find the intersection in one field of these sets (the client)... for example in dot notation would be &lt;STRONG&gt;Set1.Client * Set2.Client.&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'arial black', 'avant garde';"&gt;&lt;STRONG&gt;&lt;SPAN class="hps" style="font-size: 12px;" title="Click for alternate translations"&gt;Which is the correct syntax for these operations for find the union, intersection, XOR and difference between the sets (Set1, Set2) on a specific field like customer?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot, Paolo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 10:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/317290#M117032</guid>
      <dc:creator>rnepla83</dc:creator>
      <dc:date>2011-07-29T10:49:49Z</dc:date>
    </item>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/317291#M117033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paolo, you can try building a QVW to test all this and make it easier for people to help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get customers who bought products in one set and in another set you can try something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;CLIENT={"=sum({SET_A} Sales)&amp;gt;0 AND sum({SET_B} Sales)&amp;gt;0 "}&amp;gt;} CLIENT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A similar way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt;CLIENT={"=sum({SET_A} Sales)&amp;gt;0"}&amp;gt;}*{"=sum({SET_B} Sales)&amp;gt;0 "}&amp;gt;} CLIENT)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 15:13:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/317291#M117033</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2011-07-29T15:13:34Z</dc:date>
    </item>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/317292#M117034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Daniel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 07:45:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/317292#M117034</guid>
      <dc:creator>rnepla83</dc:creator>
      <dc:date>2011-08-01T07:45:31Z</dc:date>
    </item>
  </channel>
</rss>

