<?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: Logical and or with match in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Logical-and-or-with-match/m-p/840352#M656367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from your question I think you only want the result in bold in my testdata&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;testdata:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load * inline [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;name, COURSE, GRADE&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;m, ENG2, A&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;m, ENG3, A&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;m, MATH5, A&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;n, ENG2, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;n, ENG3, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;o, HIS, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;o, ENG3, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;o, MATH5, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;p, ENG2, F&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;p, ENG3, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;p, MATH5, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;result:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load name, if(NUM=3,1,0) as Flag;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; name,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; count(DISTINCT COURSE) as NUM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident testdata&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where match(COURSE, 'ENG2','ENG3','MATH5') and match(GRADE,'E', 'D','C', 'B','A' )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;group by name;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/88594_1.png" style="height: auto; width: auto;" /&gt;&lt;/EM&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 07 Jun 2015 09:46:51 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2015-06-07T09:46:51Z</dc:date>
    <item>
      <title>Logical and or with match</title>
      <link>https://community.qlik.com/t5/QlikView/Logical-and-or-with-match/m-p/840351#M656366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hava a problem with the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;name,&lt;/P&gt;&lt;P&gt;1 as _Flag&lt;/P&gt;&lt;P&gt;Where&lt;/P&gt;&lt;P&gt;&amp;nbsp; ( Match(COURSE ,'ENG2', 'ENG3') or Match(GRADE,'E', 'D','C', 'B','A' ))&lt;/P&gt;&lt;P&gt;&amp;nbsp; And (Match(COURSE,&amp;nbsp; 'MATH5') or Match(GRADE, 'E', 'D','C', 'B','A' ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meaning that if a person attended both of the courses in English and got a valid grade and also attended the 'MATH5' class and got a valid grade in that course too then the Flag=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get to many records when I run the code above and not sure what I'm thinking wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 09:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logical-and-or-with-match/m-p/840351#M656366</guid>
      <dc:creator />
      <dc:date>2015-06-07T09:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Logical and or with match</title>
      <link>https://community.qlik.com/t5/QlikView/Logical-and-or-with-match/m-p/840352#M656367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from your question I think you only want the result in bold in my testdata&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;testdata:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load * inline [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;name, COURSE, GRADE&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;m, ENG2, A&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;m, ENG3, A&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;m, MATH5, A&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;n, ENG2, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;n, ENG3, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;o, HIS, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;o, ENG3, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;o, MATH5, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;p, ENG2, F&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;p, ENG3, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;p, MATH5, A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;result:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load name, if(NUM=3,1,0) as Flag;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; name,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; count(DISTINCT COURSE) as NUM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;resident testdata&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where match(COURSE, 'ENG2','ENG3','MATH5') and match(GRADE,'E', 'D','C', 'B','A' )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;group by name;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/88594_1.png" style="height: auto; width: auto;" /&gt;&lt;/EM&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 09:46:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logical-and-or-with-match/m-p/840352#M656367</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-06-07T09:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Logical and or with match</title>
      <link>https://community.qlik.com/t5/QlikView/Logical-and-or-with-match/m-p/840353#M656368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank's :-). That was the solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 09:55:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logical-and-or-with-match/m-p/840353#M656368</guid>
      <dc:creator />
      <dc:date>2015-06-07T09:55:45Z</dc:date>
    </item>
  </channel>
</rss>

