<?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: Combining Set Analysis Operators in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029767#M347776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses everyone. How do I upload a qlikview file to the forum? I've put together a simplified example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2016 23:16:32 GMT</pubDate>
    <dc:creator>mjamesking</dc:creator>
    <dc:date>2016-04-13T23:16:32Z</dc:date>
    <item>
      <title>Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029763#M347772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that to create a union between two sets you use syntax such as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;set1&amp;gt; + &amp;lt;set2&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and to create the intersection of twos sets you use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;set1&amp;gt; * &amp;lt;set2&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But is there any was of combining these operators?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance I would like to create the intersection of sets, each of which is the union of two sets itself&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(&amp;lt;set1&amp;gt; + &amp;lt;set2&amp;gt;) * (&amp;lt;set3&amp;gt; + &amp;lt;set4&amp;gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doesn't like the parenthesis though&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 22:13:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029763#M347772</guid>
      <dc:creator>mjamesking</dc:creator>
      <dc:date>2016-04-13T22:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029764#M347773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems to work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you upload a sample that doesn't work as expected (and maybe add the expected result, too)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;Tested on QV12 IR with set expressions like&lt;/P&gt;&lt;P&gt;=Concat({(&amp;lt;TASK = {2}&amp;gt;+&amp;lt;TASK = {1}&amp;gt;)*(&amp;lt;TASK = {1}&amp;gt;+&amp;lt;TASK = {3}&amp;gt;)}TASK,', ')&lt;/P&gt;&lt;P&gt;=Concat({&amp;lt;TASK = {2}&amp;gt;+(&amp;lt;TASK = {1}&amp;gt;)*(&amp;lt;TASK = {1}&amp;gt;)+&amp;lt;TASK = {3}&amp;gt;} TASK,', ')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 22:45:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029764#M347773</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-13T22:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029765#M347774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what your problem is but use of parenthesis is covered by manual:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Year = Year + ({“20*”,1997} – {2000}) &amp;gt;} Sales&lt;SPAN class="Bold"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Year = (Year + {“20*”,1997}) – {2000} &amp;gt;} Sales&lt;SPAN class="Bold"&gt; )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;These two expressions have different logic due to use of &lt;SPAN style="font-size: 13.3333px;"&gt;parenthesis.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;Best regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;Maxim&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 22:55:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029765#M347774</guid>
      <dc:creator>maksim_senin</dc:creator>
      <dc:date>2016-04-13T22:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029766#M347775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly are your sets, may be the two sets don't have anything in common and that's why you don't see any results?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 23:02:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029766#M347775</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-13T23:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029767#M347776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses everyone. How do I upload a qlikview file to the forum? I've put together a simplified example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2016 23:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029767#M347776</guid>
      <dc:creator>mjamesking</dc:creator>
      <dc:date>2016-04-13T23:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029768#M347777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check here: &lt;A href="https://community.qlik.com/docs/DOC-16454"&gt;Uploading a Sample&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 09:05:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029768#M347777</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-14T09:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029769#M347778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here we go...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a simplified example of what I'm trying to do. The first two combined sets (Union) work as expected, then what I want to do is to get the intersection of these two combined sets, but the result isn't as expected, I would expect the and (Count) to be 3 (ids 4, 8 and 10). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:40:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029769#M347778</guid>
      <dc:creator>mjamesking</dc:creator>
      <dc:date>2016-04-14T14:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029770#M347779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=COUNT({(&amp;lt;Category1 = {A}&amp;gt; + &amp;lt;Category2 = {Red}&amp;gt;) * (&amp;lt;Category3 = {Bananas}&amp;gt; + &amp;lt;Category4 = {Brunette}&amp;gt;)} ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/121704_Capture.PNG" style="height: 181px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 15:02:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029770#M347779</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-14T15:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029771#M347780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neverming the red wiggly lines underneath set expression parts in aggregation expressions, if that is what is bothering you. In many cases, even the syntax checker in the expression editor isn't aware of what QlikView is capable of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 15:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029771#M347780</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-04-14T15:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029772#M347781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't even get red wiggly lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt, I believe you should get your expected result if you use parentheses as you indicated in your OP (but it seems you've removed these from your sample file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=COUNT({(&amp;lt;Category1 = {A}&amp;gt; + &amp;lt;Category2 = {Red}&amp;gt;) * (&amp;lt;Category3 = {Bananas}&amp;gt; + &amp;lt;Category4 = {Brunette}&amp;gt;)} ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will get an error if you place the set identifier at the wrong place:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;=COUNT({$(&amp;lt;Category1 = {A}&amp;gt; + &amp;lt;Category2 = {Red}&amp;gt;) * (&amp;lt;Category3 = {Bananas}&amp;gt; + &amp;lt;Category4 = {Brunette}&amp;gt;)} ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While this should be ok (or just remove the default set identifier:&lt;/P&gt;&lt;P&gt;=COUNT({($&amp;lt;Category1 = {A}&amp;gt; + $&amp;lt;Category2 = {Red}&amp;gt;) * ($&amp;lt;Category3 = {Bananas}&amp;gt; + $&amp;lt;Category4 = {Brunette}&amp;gt;)} ID)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 16:59:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029772#M347781</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-14T16:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Set Analysis Operators</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029773#M347782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for your help, I was close, but the combination of the $ and the ( was making qllikview think I was referencing a variable so I didn't pursue this route, both &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;sunindia&lt;/A&gt; and &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt; approaches work perfectly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2016 18:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-Set-Analysis-Operators/m-p/1029773#M347782</guid>
      <dc:creator>mjamesking</dc:creator>
      <dc:date>2016-04-14T18:00:12Z</dc:date>
    </item>
  </channel>
</rss>

