<?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>article Generating AND, OR , NOT selection logic in Qlik Sense in Qlik Sense Documents</title>
    <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/ta-p/1479510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'AND mode' is an out of box feature in QlikView whereby a QlikView developer a list box in a QlikView application to use 'AND mode' rather than the default 'OR mode'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Qlik Sense, its not there out of box in the same way, but some minor SET ANALYSIS expression syntax can create the right context on a chart to show the output in an "AND" context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is a self contained application that demonstrates the technique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please also refer to these screenshots:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the sample data... notice that Skill 'A' ,'B', and 'C' is associated only with User '1'.&amp;nbsp; But User '1', '2', and '3' are collectively associated (OR mode) with the 'A','B', and 'C' set of skills&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="95982" alt="AndMode1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/95982_AndMode1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created an educational UI in the app to show how the default 'OR' mode chart contrasts with an 'AND' mode technique&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="95983" alt="AndMode2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/95983_AndMode2.PNG" style="height: 624px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i select Skills&amp;nbsp; 'A', 'B' , and 'C' ... notice that the AND mode chart shows only User '1'.&lt;/P&gt;&lt;P&gt;But the OR mode chart shows Users '1', '2', and '3'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="95987" alt="AndMode3.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/95987_AndMode3.PNG" style="height: 664px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OR mode expression is:&amp;nbsp;&amp;nbsp; count (distinct Skills)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The measure expression on the AND mode is modified to the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically it filters the result to show only users where the unique number of skills associated to them is equivalent to the number of distinct skills selections in the UI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="95988" alt="AndMode4.PNG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/95988_AndMode4.PNG" style="height: 124px; width: 620px;" /&gt;&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;Version 2-3 update:&amp;nbsp; Just added a&amp;nbsp; NOT mode tab where you can combine AND with NOT and see a list of users with all the skills selected but exluding users who already have one or more skills selected from a different list.&amp;nbsp; Full description below in the comments.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2015 16:17:39 GMT</pubDate>
    <dc:creator>JonnyPoole</dc:creator>
    <dc:date>2015-08-13T16:17:39Z</dc:date>
    <item>
      <title>Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/ta-p/1479510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'AND mode' is an out of box feature in QlikView whereby a QlikView developer a list box in a QlikView application to use 'AND mode' rather than the default 'OR mode'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Qlik Sense, its not there out of box in the same way, but some minor SET ANALYSIS expression syntax can create the right context on a chart to show the output in an "AND" context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is a self contained application that demonstrates the technique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please also refer to these screenshots:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the sample data... notice that Skill 'A' ,'B', and 'C' is associated only with User '1'.&amp;nbsp; But User '1', '2', and '3' are collectively associated (OR mode) with the 'A','B', and 'C' set of skills&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="95982" alt="AndMode1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/95982_AndMode1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created an educational UI in the app to show how the default 'OR' mode chart contrasts with an 'AND' mode technique&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="95983" alt="AndMode2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/95983_AndMode2.PNG" style="height: 624px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i select Skills&amp;nbsp; 'A', 'B' , and 'C' ... notice that the AND mode chart shows only User '1'.&lt;/P&gt;&lt;P&gt;But the OR mode chart shows Users '1', '2', and '3'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="95987" alt="AndMode3.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/95987_AndMode3.PNG" style="height: 664px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OR mode expression is:&amp;nbsp;&amp;nbsp; count (distinct Skills)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The measure expression on the AND mode is modified to the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically it filters the result to show only users where the unique number of skills associated to them is equivalent to the number of distinct skills selections in the UI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="95988" alt="AndMode4.PNG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/95988_AndMode4.PNG" style="height: 124px; width: 620px;" /&gt;&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;Version 2-3 update:&amp;nbsp; Just added a&amp;nbsp; NOT mode tab where you can combine AND with NOT and see a list of users with all the skills selected but exluding users who already have one or more skills selected from a different list.&amp;nbsp; Full description below in the comments.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 16:17:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/ta-p/1479510</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2015-08-13T16:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479511#M497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, that is a pretty special case. Are there any good methods for showing (in a table) all users which have both skills A and B but not C?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 09:20:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479511#M497</guid>
      <dc:creator />
      <dc:date>2015-10-20T09:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479512#M498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that is possible.&amp;nbsp; You would introduce a 2nd user list (via data island) to capture the accounts to exclude and then update the expression accordingly.&amp;nbsp; Again i would use set analysis to do this. You can use *,-,+ operators to capture the right combination of the two sets of users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This document is more geared at QlikView users who leveraged 'and mode'.&amp;nbsp; The direction you are referring to is getting more sophisticated . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example can be found on the 'small business targetting' tab of the this demo. Its for QlikView but can be done in QLik Sense using similar techniques&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://us-d.demo.qlik.com/QvAJAXZfc/opendoc.htm?document=qvdocs%2FRetail%20Banking%20Sales%20and%20Customer%20Targeting.qvw&amp;amp;host=demo11" title="http://us-d.demo.qlik.com/QvAJAXZfc/opendoc.htm?document=qvdocs%2FRetail%20Banking%20Sales%20and%20Customer%20Targeting.qvw&amp;amp;host=demo11"&gt;QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 20:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479512#M498</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2015-10-20T20:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479513#M499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! Yeah, I am trying to do this in another application, but it is hard to get the set analysis right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am thinking along the lines of this snippet:&lt;/P&gt;&lt;P&gt;count(&amp;lt;[Skills] = P([Data Island Skills To Have])&amp;gt;*&amp;lt;[Skills] = P([Data Island Skills Not To Have])&amp;gt;[User])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 21:13:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479513#M499</guid>
      <dc:creator />
      <dc:date>2015-10-20T21:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479514#M500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good challenge. It wasn't the most straight forward but together with HIC's blog posts on Set Analysis I created a NEW tab in the AND mode app. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll post the QVF but here are some screenshots:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new page has an 'AND' filter pane of skills as well as a new 'NOT' filter pane of skills. The 'NOT' skills are a new data island derived from the list of skills using a resident load&amp;nbsp; (Load&amp;nbsp; Skills as NotSkills resident existingdata; ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are no users with all the skills, so the bottom left chart is empty, and since no skills have been selected in the NOT list, there are no users to exclude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the top right you can see that a different way: both the And List and Not List is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the bar chart just shows every user&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Step1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102772_Step1.png" style="height: 277px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To see how i show the logic, here i select Skills='A' and notice how Skills='A' is associated with both user 1 and user 2.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Step2.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/102804_Step2.png" style="height: 280px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i step back and select Skills='C' instead, notice that Skills='C' is associated with User 1 , 3 and 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Step3.png" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/102805_Step3.png" style="height: 285px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what happens if i start over and select&amp;nbsp; Skills='A'&amp;nbsp; and NotSkills='C' . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The AND list will result in users 1 and 2.&amp;nbsp; and the Not list will result in users 1 , 3, and 5. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the expected result is.... user=2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Step4.png" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/102806_Step4.png" style="height: 290px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The full expression in the bar chart uses different SET Analysis depending if both filter panes are selected , one of them or neither.&amp;nbsp; If both are selected then i use this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; count( distinct {&amp;lt;User={"=aggr(count(distinct Skills),User)=getselectedcount(Skills)"}&amp;gt; - &amp;lt;User= p( {1&amp;lt;Skills={$(=vNotSkills)}&amp;gt;} User)&amp;nbsp; &amp;gt;}&amp;nbsp; Skills) &lt;/P&gt;&lt;P&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first part:&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp; count( distinct {&amp;lt;User={"=aggr(count(distinct Skills),User)=getselectedcount(Skills)"}&amp;gt; ... ....provides the AND mode set. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the 2nd part:&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt; &amp;lt;User= p( {1&amp;lt;Skills={$(=vNotSkills)}&amp;gt;} User)&amp;nbsp; &amp;gt;}&amp;nbsp; Skills) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...provides the NOT set. Notice that we are removing users associated with a list of 'Not' skills. So there is an additional complexity using the p() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the vNotSkills is a variable with definition:&lt;/P&gt;&lt;P&gt;=chr(39) &amp;amp; concat( distinct NotSkills, chr(39) &amp;amp; ',' &amp;amp; chr(39)) &amp;amp; chr(39)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will produce a comma and single quote delimitted list of the selected NOT skills with preceding and trailing single quotes added (chr(39).&amp;nbsp; This ensures that the delimitted list is compliant with Set Analysis syntax.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 13:03:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479514#M500</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2015-10-22T13:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479515#M501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool! Thanks a lot. I will go through this in detail tomorrow, but it looks really helpful! Seems like a pretty common thing to do when trying to figure out what customers to target with campaigns for specific products etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 13:38:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479515#M501</guid>
      <dc:creator />
      <dc:date>2015-10-22T13:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479516#M502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, i uploaded the new QVF to the document which is now updated to be the 3rd version of the initial post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 13:49:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479516#M502</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2015-10-22T13:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479517#M503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Man, thank you so much! I was starting to think that there wasn't any way to achieve AND logic in Qlik Sense. This is exactly what I needed!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2017 13:50:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479517#M503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-09T13:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479518#M504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #8b8b8b; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt; &lt;/SPAN&gt;&lt;A href="https://community.qlik.com/people/jpe"&gt;jpe&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a similar requirement of AND operation. Here i have two tables. The first table showing the Groups and count using the set expression as below. Second table showing the user details. If i select A,B,C then first table shows count as one but user details table not filtering based on selection. I need to show only that common user in table. Could you please advise how to change the set expression in my case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(getselectedcount(Group)&amp;gt;0,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;count( distinct {&amp;lt;User={"=aggr(count(distinct Group),User)=getselectedcount(Group)"}&amp;gt;} User) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;count(distinct User)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Users:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; * inline&amp;nbsp;&amp;nbsp; [&lt;/P&gt;&lt;P&gt;User, Name&lt;/P&gt;&lt;P&gt;1, ABC&lt;/P&gt;&lt;P&gt;2, BCD&lt;/P&gt;&lt;P&gt;3, EFG&lt;/P&gt;&lt;P&gt;4, RTG&lt;/P&gt;&lt;P&gt;5, YUR&lt;/P&gt;&lt;P&gt;6, IOB&lt;/P&gt;&lt;P&gt;7, LIK&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matrix:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; * inline&amp;nbsp;&amp;nbsp; [&lt;/P&gt;&lt;P&gt;Group,User&lt;/P&gt;&lt;P&gt;A,1&lt;/P&gt;&lt;P&gt;B,1&lt;/P&gt;&lt;P&gt;C,1&lt;/P&gt;&lt;P&gt;B,2&lt;/P&gt;&lt;P&gt;A,2&lt;/P&gt;&lt;P&gt;C,3&lt;/P&gt;&lt;P&gt;D,4&lt;/P&gt;&lt;P&gt;C,5&lt;/P&gt;&lt;P&gt;D,5&lt;/P&gt;&lt;P&gt;E,5&lt;/P&gt;&lt;P&gt;E,5&lt;/P&gt;&lt;P&gt;F,6&lt;/P&gt;&lt;P&gt;G,7&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Test.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/197433_Test.jpg" style="font-size: 13.3333px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2018 09:22:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1479518#M504</guid>
      <dc:creator>shirenmathai</dc:creator>
      <dc:date>2018-03-26T09:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1783845#M4609</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/332"&gt;@JonnyPoole&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;this&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(getselectedcount(Reason)&amp;gt;0,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;count( distinct {&amp;lt;User={"=aggr(count(distinct Reason),User)=getselectedcount(Reason)"}&amp;gt;} User)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;count(distinct User)&lt;/P&gt;&lt;P&gt;)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for me counts all the distinct reasons that exist in the filter (without making any selections).&lt;/P&gt;&lt;P&gt;I was expecting a count of users, AFTER selecting in Reason filter. Right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please elaborate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ioanna&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 14:07:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/1783845#M4609</guid>
      <dc:creator>ioannagr</dc:creator>
      <dc:date>2021-02-18T14:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/2128295#M5752</link>
      <description>&lt;P&gt;Hi, Thank you for sharing this post. It is very helpful. Maybe some day we see And mode in Qlik Sense.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm don't know if I have latest version, but I think that there is small error on AND &amp;amp; NOT sheet.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my Opinion when I want to see&amp;nbsp;&amp;nbsp;only Users who don't have skill C. To achieve this I select only one value from NotSkills&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2.png" style="width: 394px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/118191iCF59B0EF44DDCE74/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6d8c1e0a-17a0-43ca-b9b9-0933c517adf5.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/118188iB9AB3C8961CD44A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6d8c1e0a-17a0-43ca-b9b9-0933c517adf5.png" alt="6d8c1e0a-17a0-43ca-b9b9-0933c517adf5.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In my option correct result should&amp;nbsp;look like that:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="3.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/118192i8660F4EEAF63C1DB/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;SPAN&gt;Users 1, 3, and 5 was excluded.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I believe that here should be minus after User " User &lt;STRONG&gt;-&lt;/STRONG&gt;= p "&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BoG_0-1697188049731.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/118194i0EEA9988BC9B1C1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="BoG_0-1697188049731.png" alt="BoG_0-1697188049731.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;We cant use e instead p&amp;nbsp; or =- because then we will don't get good results if someone select some Users.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 09:13:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/2128295#M5752</guid>
      <dc:creator>BogGmit</dc:creator>
      <dc:date>2023-10-13T09:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/2140050#M5768</link>
      <description>&lt;P&gt;Hi BogMgit,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for correcting Jonny's script. It works great! His script appears to be designed for use with one (target) field for one chart. I have 50 (target) product attribute fields! I can apply Jonny's script with your correction to each field, they work fine, but, as you might expect, each chart in which the target field appears is silo'd.&lt;/P&gt;
&lt;P&gt;Are you working with more than one field and by chance merging the fields? if yes, can you share how you do this?&lt;/P&gt;
&lt;P&gt;Oliver&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 00:28:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/2140050#M5768</guid>
      <dc:creator>ogatchell</dc:creator>
      <dc:date>2023-11-22T00:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/2143600#M5775</link>
      <description>&lt;P&gt;The script appears to work with multiple fields simply by intersecting "*" the scripts of each respective field. For example, here's how Jonny's script with the "Skills" field looks with a 2nd field, "State"; if anyone has a better approach, please weigh in:&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;if(getselectedcount(Skills)&amp;gt;0 and getselectedcount(NotSkills) &amp;gt; 0,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; count( distinct {&amp;lt;User={"=aggr(count(distinct Skills),User)=getselectedcount(Skills)"}&amp;gt; - &amp;lt;User= p( {1&amp;lt;Skills={$(=vNotSkills)}&amp;gt;} User)&amp;nbsp; &amp;gt;}&amp;nbsp; Skills)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; ,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; if(getselectedcount(Skills) &amp;gt; 0 ,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; count( distinct {&amp;lt;User={"=aggr(count(distinct Skills),User)=getselectedcount(Skills)"}&amp;gt; }&amp;nbsp; Skills) ,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(getselectedcount(NotSkills) &amp;gt; 0 ,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; count( distinct {&amp;lt;User -= p( {1&amp;lt;Skills={$(=vNotSkills)}&amp;gt;} User)&amp;nbsp; &amp;gt;}&amp;nbsp; Skills) ,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count(distinct Skills)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; )&lt;/DIV&gt;
&lt;DIV&gt;)&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*&lt;/P&gt;
&lt;DIV&gt;if(getselectedcount(State)&amp;gt;0 and getselectedcount(NotState) &amp;gt; 0,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; count( distinct {&amp;lt;User={"=aggr(count(distinct State),User)=getselectedcount(State)"}&amp;gt; - &amp;lt;User= p( {1&amp;lt;State={$(=vNotSkills)}&amp;gt;} User)&amp;nbsp; &amp;gt;}&amp;nbsp; State)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; ,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; if(getselectedcount(State) &amp;gt; 0 ,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; count( distinct {&amp;lt;User={"=aggr(count(distinct State),User)=getselectedcount(State)"}&amp;gt; }&amp;nbsp; State) ,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(getselectedcount(NotState) &amp;gt; 0 ,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; count( distinct {&amp;lt;User -= p( {1&amp;lt;State={$(=vNotState)}&amp;gt;} User)&amp;nbsp; &amp;gt;}&amp;nbsp; State) ,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; count(distinct State)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; )&lt;/DIV&gt;
&lt;DIV&gt;)&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2023 23:43:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/2143600#M5775</guid>
      <dc:creator>ogatchell</dc:creator>
      <dc:date>2023-12-02T23:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Generating AND, OR , NOT selection logic in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/2143601#M5776</link>
      <description>&lt;P&gt;Does Jonny's solution preclude the use of OR logic in the chart, which displays output of AND and NOT selections?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Qlikview, Qlik executes AND and NOT logic operation in a single list box. A user can apply AND logic, NOT logic or both in this box. In addition, this box and a standard OR logic list box can be placed side-by-side, and selections made in either box. In other words, OR, AND and NOT logic can be applied to the same field. While AND and NOT logic selections may remove selection previously made or preclude OR selections subsequently made, OR selections are still be possible. In other words, AND and NOT selections do not necessarily preclude OR selections.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whereas, Jonny's script operates with separate AND and NOT logic filter panes (list boxes); and, the "AND" list box is actually a standard OR logic list box; but, it operates as an AND list box within the chart that displays the output of the AND and NOT selections.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To answer my question, I think it does&amp;nbsp;preclude the use of OR logic in the chart. But please correct me if this is wrong.&lt;/P&gt;
&lt;P&gt;Btw, how can Qlik Sense reasonably support human thought in Natural Language Processing if a user can't exercise OR, AND and NOT logic at will in the selection of field values?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 00:26:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Sense-Documents/Generating-AND-OR-NOT-selection-logic-in-Qlik-Sense/tac-p/2143601#M5776</guid>
      <dc:creator>ogatchell</dc:creator>
      <dc:date>2023-12-03T00:26:26Z</dc:date>
    </item>
  </channel>
</rss>

