<?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: Where Clause using OR and AND not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1978947#M1220900</link>
    <description>&lt;P&gt;This is very useful. I have found QlikSense to be super cubersome. I previously used PowerBI, Tableau, Pandas but QlikSense and QlikSense resources are frustrating.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Sep 2022 19:36:10 GMT</pubDate>
    <dc:creator>FunmiOdemuyiwa</dc:creator>
    <dc:date>2022-09-08T19:36:10Z</dc:date>
    <item>
      <title>Where Clause using OR and AND not working</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1201131#M626147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a where clause that I need to filter the data set for specific users AND also only show two possible statuses for those specific users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my Where clause with just the users filtered for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where User = 'John'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; or User = 'Sally'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; or User = 'Beth'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what I need is to add a filter for the Status field but also keep the specified users... Here is what I have been trying but it won't actually filter the Status Field, it keeps showing all the statuses for the users specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Where User = 'John' &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; or User = 'Sally'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; or User = 'Beth'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; and Match(Status,'Past Due', 'In Process')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Where User = 'John' &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; or User = 'Sally'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; or User = 'Beth'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; and Status='Past Due' or Status= 'In Process'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Where Status='Past Due' or Status= 'In Process'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; and User = 'John' &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; or User = 'Sally'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; or User = 'Beth'&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NONE of these work. I am sure something is wrong with my syntax. Any help or advice would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:33:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1201131#M626147</guid>
      <dc:creator>crystles</dc:creator>
      <dc:date>2016-10-17T15:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Where Clause using OR and AND not working</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1201132#M626148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use parentheses to group the OR clauses, or use two Match() calls instead, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Where ((User = 'John') or&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (User = 'Sally') or&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (User = 'Beth')) and&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Match(Status, 'Past Due', 'In Process')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;or&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Where Match(User, 'John', 'Sally', 'Beth') &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;and &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Match(Status, 'Past Due', 'In Process')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1201132#M626148</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-10-17T15:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Where Clause using OR and AND not working</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1201133#M626149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you doing this in SQL or QlikView's Load script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For QlikView, try this:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Where Match(User, 'John', 'Sally', 'Beth') and Match(Status,'Past Due', 'In Process');&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For SQL, may be this:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Where User in (&lt;/STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;'John', 'Sally', 'Beth') and Status in (&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;'Past Due', 'In Process');&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1201133#M626149</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-17T15:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Where Clause using OR and AND not working</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1201134#M626150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both of you were correct, but I have to mark the person who commented first as correct just to be fair.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the two match statements and that worked perfectly.(see below) Thank you to you both!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where Match(User, 'John','Sally','Beth')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Match(Status,'Past Due','In Progress')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:47:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1201134#M626150</guid>
      <dc:creator>crystles</dc:creator>
      <dc:date>2016-10-17T15:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Where Clause using OR and AND not working</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1978947#M1220900</link>
      <description>&lt;P&gt;This is very useful. I have found QlikSense to be super cubersome. I previously used PowerBI, Tableau, Pandas but QlikSense and QlikSense resources are frustrating.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 19:36:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Clause-using-OR-and-AND-not-working/m-p/1978947#M1220900</guid>
      <dc:creator>FunmiOdemuyiwa</dc:creator>
      <dc:date>2022-09-08T19:36:10Z</dc:date>
    </item>
  </channel>
</rss>

