<?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: Data filtering in expression in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Data-filtering-in-expression/m-p/1796567#M8738</link>
    <description>&lt;P&gt;&lt;SPAN&gt;There are a couple of ways to approach this.&amp;nbsp; One is to use the Match() function, like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=if( [Product Class] = 'Class 1' and Match([Product Category],'2','3')&amp;gt;0, 'Class 1 Cat.2&amp;amp;3',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if( [Product Class] = 'Class 5' and [Product Category] = '3', 'Class 5 Cat.3'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically, the Match() will return the position of the [Product Category] value in the list provided (in this case '2,'3') and returns 0 if it is not found.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 10:23:38 GMT</pubDate>
    <dc:creator>GaryGiles</dc:creator>
    <dc:date>2021-04-02T10:23:38Z</dc:date>
    <item>
      <title>Data filtering in expression</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Data-filtering-in-expression/m-p/1796556#M8408</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an app where I keep track of the stock of some products, and a few of them have a limit on their stock.&lt;/P&gt;&lt;P&gt;I want to create a dimension that only keeps data for these limited products, but I have a problem when writing the expression. I want to keep the 'Class 1' products with category '2' or '3' and the 'Class 5' products with category '3' since they are the only one with a stock limit.&lt;/P&gt;&lt;P&gt;Here's my expression:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;=if( [Product Class] = 'Class 1' and [Product Category] = ('2','3'), 'Class 1 Cat.2&amp;amp;3',&lt;BR /&gt;if( [Product Class] = 'Class 5' and [Product Category] = '3', 'Class 5 Cat.3'))&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The filtering on Class 5 is working fine but with Class 1, I can't seem to filter on 2 different categories.&lt;/P&gt;&lt;P&gt;What should I modify in my expression?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:09:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Data-filtering-in-expression/m-p/1796556#M8408</guid>
      <dc:creator>victor_jacquens</dc:creator>
      <dc:date>2021-12-10T21:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Data filtering in expression</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Data-filtering-in-expression/m-p/1796567#M8738</link>
      <description>&lt;P&gt;&lt;SPAN&gt;There are a couple of ways to approach this.&amp;nbsp; One is to use the Match() function, like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=if( [Product Class] = 'Class 1' and Match([Product Category],'2','3')&amp;gt;0, 'Class 1 Cat.2&amp;amp;3',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if( [Product Class] = 'Class 5' and [Product Category] = '3', 'Class 5 Cat.3'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically, the Match() will return the position of the [Product Category] value in the list provided (in this case '2,'3') and returns 0 if it is not found.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 10:23:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Data-filtering-in-expression/m-p/1796567#M8738</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-04-02T10:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Data filtering in expression</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Data-filtering-in-expression/m-p/1796568#M8739</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;I just found another solution, which is:&lt;/P&gt;&lt;P&gt;=if( ([Product Class] = 'Class 1' and [Product Category] = '2') or ([Product Class] = 'Class 1' and [Product Category] = '3'), 'Class 1 Cat.2&amp;amp;3',&lt;BR /&gt;&lt;SPAN&gt;if( [Product Class] = 'Class 5' and [Product Category] = '3', 'Class 5 Cat.3'))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 10:28:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Data-filtering-in-expression/m-p/1796568#M8739</guid>
      <dc:creator>victor_jacquens</dc:creator>
      <dc:date>2021-04-02T10:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Data filtering in expression</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Data-filtering-in-expression/m-p/1796572#M8740</link>
      <description>&lt;P&gt;Like I said, there are multiple approaches.&amp;nbsp; The Match() function approach has the advantage of being easier to read/write/change, especially if you had many [Product Class] values that you wanted to include.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 10:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Data-filtering-in-expression/m-p/1796572#M8740</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-04-02T10:32:02Z</dc:date>
    </item>
  </channel>
</rss>

