<?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 Intersection of two fields. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-fields/m-p/292599#M496587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;id1 *= p(id2)&amp;gt;} id1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;id1 /= p(id2)&amp;gt;} id1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 11 Dec 2011 20:19:34 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-12-11T20:19:34Z</dc:date>
    <item>
      <title>Intersection of two fields.</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-fields/m-p/292598#M496586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I load two fields with IDs: id1 and id2. Each of the fields also has date dimension (date1 and date2) associated with them. I need to write an expression that given the current date1 and date2 selection will count number of IDs that are in both ID fields. I could also use an expression that finds the difference between the fields, i.e. IDs that are in id1, but not in id2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the above is unclear, here is an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="139" style="border: 1px solid #000000; width: 124px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;date1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;id1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/19/2011&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/19/2011&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/19/2011&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/19/2011&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/20/2011&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/20/2011&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" height="139" style="border: 1px solid #000000; width: 125px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;date2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;id2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/23/2011&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/23/2011&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/23/2011&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/23/2011&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/23/2011&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/25/2011&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the list box for date1 I select "11/19/2011", which leaves IDs {1, 2, 3, 4} in id1. In the list box for date2 I select "11/23/2011", which leaves IDs {1, 3, 4, 7, 8} in id2. I need expressions that will return 3 as the number of IDs present in both fields ({1, 3, 4}) and 1 as the number of IDs present in id1, but not present in id2 ({2}). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 18:48:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-of-two-fields/m-p/292598#M496586</guid>
      <dc:creator>boris_nechaev</dc:creator>
      <dc:date>2011-12-11T18:48:35Z</dc:date>
    </item>
    <item>
      <title>Intersection of two fields.</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-fields/m-p/292599#M496587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;id1 *= p(id2)&amp;gt;} id1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;id1 /= p(id2)&amp;gt;} id1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 20:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-of-two-fields/m-p/292599#M496587</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-11T20:19:34Z</dc:date>
    </item>
    <item>
      <title>Intersection of two fields.</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-fields/m-p/292600#M496588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, worked like a charm!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2011 16:53:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-of-two-fields/m-p/292600#M496588</guid>
      <dc:creator>boris_nechaev</dc:creator>
      <dc:date>2011-12-12T16:53:39Z</dc:date>
    </item>
  </channel>
</rss>

