<?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 listboxes in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197180#M56957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right I think we're there with aggregated set analysis:&lt;/P&gt;&lt;P&gt;Listbox expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(aggr(count({1&amp;lt;Product_Class= {'Pet Food'} &amp;gt;} SalesPerson),SalesPerson)&amp;gt;=1 and aggr(count({1&amp;lt;Product_Class= {'Ready Meals'} &amp;gt;} SalesPerson),SalesPerson)&amp;gt;=1,SalesPerson)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This returns a list of 'SalesPerson'(s) where they have a sale of 'Pet Food' AND a sale of 'Ready Meals' - but not necessarily on the same line. I've tested against making the selections manually in the 'Product_Class' dimension and it returns the same results - ie: those who appear in both listboxes.&lt;/P&gt;&lt;P&gt;You should be able to adapt accordingly to work with your timestamps.&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Feb 2011 12:07:41 GMT</pubDate>
    <dc:creator>matt_crowther</dc:creator>
    <dc:date>2011-02-02T12:07:41Z</dc:date>
    <item>
      <title>Intersection of two listboxes</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197176#M56953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i have two listboxes which show a list of client ids:&lt;/P&gt;&lt;P&gt;Listbox 1&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If ((Event= 1) and Timestamp((&lt;B&gt;&lt;I&gt;Heute&lt;/I&gt;&lt;/B&gt; -1) + '12:00:00') &amp;lt; Zeitpunkt and Zeitpunkt &amp;lt;= Timestamp((&lt;B&gt;&lt;I&gt;Heute&lt;/I&gt;&lt;/B&gt;) + '12:00:00'), ClientID)&lt;/P&gt;&lt;P&gt;Listbox 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;If ((Event= 1) and Timestamp((&lt;B&gt;&lt;I&gt;Heute&lt;/I&gt;&lt;/B&gt; -2) + '12:00:00') &amp;lt; Zeitpunkt and Zeitpunkt &amp;lt;= Timestamp((&lt;B&gt;&lt;I&gt;Heute&lt;/I&gt;&lt;/B&gt; -1) + '12:00:00'), ClientID)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Is there any possibility to create a new listbox with intersection of both lists above (Listbox 1 and Listbox 2)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 09:11:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197176#M56953</guid>
      <dc:creator />
      <dc:date>2011-02-02T09:11:08Z</dc:date>
    </item>
    <item>
      <title>Intersection of two listboxes</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197177#M56954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may be making this overly simplistic or missing your point but you can use the 'or' &amp;amp; 'and' operators to join 2 if statements eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(left(SalesPerson,1)='H' or left(SalesPerson,1)='W',SalesPerson)&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;=if(left(SalesPerson,1)='H' and right(SalesPerson,1)='m',SalesPerson)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 10:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197177#M56954</guid>
      <dc:creator>matt_crowther</dc:creator>
      <dc:date>2011-02-02T10:38:42Z</dc:date>
    </item>
    <item>
      <title>Intersection of two listboxes</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197178#M56955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;i implemented your suggestion:&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;if(((Event= 1) and Timestamp(&lt;B&gt;&lt;I&gt;Heute&lt;/I&gt;&lt;/B&gt; -1 + '12:00:00')&amp;lt; Zeitpunkt and Zeitpunkt &amp;lt;= Timestamp(&lt;B&gt;&lt;I&gt;Heute&lt;/I&gt;&lt;/B&gt; + '12:00:00'))&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;((&lt;/P&gt;&lt;P&gt;Event= 1) and Timestamp(&lt;B&gt;&lt;I&gt;Heute&lt;/I&gt;&lt;/B&gt; -2 + '12:00:00')&amp;lt; Zeitpunkt and Zeitpunkt &amp;lt;= Timestamp(&lt;B&gt;&lt;I&gt;Heute&lt;/I&gt;&lt;/B&gt;-1 + '12:00:00')), ClientID )&lt;/P&gt;&lt;P&gt;This statement (wth the operator "and") has no result. With the operator "or" i get the list of both conditions (union). But we need the intersection of both conditions.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 11:11:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197178#M56955</guid>
      <dc:creator />
      <dc:date>2011-02-02T11:11:20Z</dc:date>
    </item>
    <item>
      <title>Intersection of two listboxes</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197179#M56956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again; I may be missing something but the 2 conditions you're trying to join conflict with each other in that no single 'Zeitpunkt' value can meet both conditions and therefore be returned.&lt;/P&gt;&lt;P&gt;Lets say 'Heute' = 10:00am&lt;/P&gt;&lt;P&gt;10 - 1 + 12 = 9:00pm / 10 + 12 = 10:00pm so if Zeitpunkt = 9:45pm it meets the condition so we take it to the second expression:&lt;/P&gt;&lt;P&gt;10 - 2 + 12 = 8:00pm / 10 - 1 + 12 = 9:00pm so our 9:45pm Zeitpunkt value fails to meet the condition and therefore isn't returned.&lt;/P&gt;&lt;P&gt;Thats why no values are returned using the 'and' operator but I think I understand what you need; ClientID's that have had and 'entry' in both conditions not either or and not both conditions simultaneously...that's trickier.&lt;/P&gt;&lt;P&gt;The inherent issue is that you need an 'if' to narrow down the results but an 'if' works on a line by line basis and no single line can meet both conditions. As a work around I'd look to make a macro or action that automatically selects the values in the 2 seperate listboxes.&lt;/P&gt;&lt;P&gt;I'll keep thinking as it's a fundamental issue that I'm sure has a solution.&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 11:50:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197179#M56956</guid>
      <dc:creator>matt_crowther</dc:creator>
      <dc:date>2011-02-02T11:50:34Z</dc:date>
    </item>
    <item>
      <title>Intersection of two listboxes</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197180#M56957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right I think we're there with aggregated set analysis:&lt;/P&gt;&lt;P&gt;Listbox expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(aggr(count({1&amp;lt;Product_Class= {'Pet Food'} &amp;gt;} SalesPerson),SalesPerson)&amp;gt;=1 and aggr(count({1&amp;lt;Product_Class= {'Ready Meals'} &amp;gt;} SalesPerson),SalesPerson)&amp;gt;=1,SalesPerson)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This returns a list of 'SalesPerson'(s) where they have a sale of 'Pet Food' AND a sale of 'Ready Meals' - but not necessarily on the same line. I've tested against making the selections manually in the 'Product_Class' dimension and it returns the same results - ie: those who appear in both listboxes.&lt;/P&gt;&lt;P&gt;You should be able to adapt accordingly to work with your timestamps.&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 12:07:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197180#M56957</guid>
      <dc:creator>matt_crowther</dc:creator>
      <dc:date>2011-02-02T12:07:41Z</dc:date>
    </item>
    <item>
      <title>Intersection of two listboxes</title>
      <link>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197181#M56958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Matt,&lt;/P&gt;&lt;P&gt;the key word to solve my problem is the function aggr().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 15:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Intersection-of-two-listboxes/m-p/197181#M56958</guid>
      <dc:creator />
      <dc:date>2011-02-02T15:01:39Z</dc:date>
    </item>
  </channel>
</rss>

