<?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 Condition for Filter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155617#M31802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your Load Script, I recommend mapping the incoming data to your Yes/No values:&lt;/P&gt;&lt;PRE&gt;[Corner Map]:&lt;BR /&gt;MAPPING LOAD * INLINE [&lt;BR /&gt;Match, Replace&lt;BR /&gt;not run, No&lt;BR /&gt;test, No&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;[Product]:&lt;BR /&gt;LOAD field1&lt;BR /&gt; ,field2&lt;BR /&gt; ,ApplyMap('Corner Map', cornertool, 'Yes') as [Corner Tool]&lt;BR /&gt; ,field4&lt;BR /&gt; ;&lt;BR /&gt;&lt;BR /&gt;SQL select field1, field2, cornertool, field4&lt;BR /&gt; from schema.table&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Aug 2010 07:29:24 GMT</pubDate>
    <dc:creator>MichaelRobertshaw</dc:creator>
    <dc:date>2010-08-11T07:29:24Z</dc:date>
    <item>
      <title>Condition for Filter</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155615#M31800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need to display values in the filter as yes or no.&lt;/P&gt;&lt;P&gt;No - When the column CornerTool is "not run" or "test"&lt;/P&gt;&lt;P&gt;Yes - When the column CornetTool has anyvalues anything other than "not run" or "test"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 21:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155615#M31800</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-10T21:43:19Z</dc:date>
    </item>
    <item>
      <title>Condition for Filter</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155616#M31801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Best is to load it as a new field:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if(match(CornerTool,'not run','test'),'No','Yes') as NewField&lt;/P&gt;&lt;P&gt;But you can also enter that same expression directly into a list box (without the 'as NewField'). Just select &amp;lt;expression&amp;gt; instead of a field when you create the list box.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 22:51:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155616#M31801</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-08-10T22:51:21Z</dc:date>
    </item>
    <item>
      <title>Condition for Filter</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155617#M31802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your Load Script, I recommend mapping the incoming data to your Yes/No values:&lt;/P&gt;&lt;PRE&gt;[Corner Map]:&lt;BR /&gt;MAPPING LOAD * INLINE [&lt;BR /&gt;Match, Replace&lt;BR /&gt;not run, No&lt;BR /&gt;test, No&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;[Product]:&lt;BR /&gt;LOAD field1&lt;BR /&gt; ,field2&lt;BR /&gt; ,ApplyMap('Corner Map', cornertool, 'Yes') as [Corner Tool]&lt;BR /&gt; ,field4&lt;BR /&gt; ;&lt;BR /&gt;&lt;BR /&gt;SQL select field1, field2, cornertool, field4&lt;BR /&gt; from schema.table&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 07:29:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155617#M31802</guid>
      <dc:creator>MichaelRobertshaw</dc:creator>
      <dc:date>2010-08-11T07:29:24Z</dc:date>
    </item>
    <item>
      <title>Condition for Filter</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155618#M31803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John&lt;/P&gt;&lt;P&gt;This format is exactly what I want to use however I cannot get it to work.&lt;/P&gt;&lt;P&gt;In my load statement I want to replace a yes/no field (ysnSHQSExemptTemp) that normally returns 1 and 0 with Yes or No&lt;/P&gt;&lt;P&gt;This expression returns all fields as "No"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;(&lt;/B&gt;match&lt;B&gt;(&lt;/B&gt;ysnSHQSExemptTemp&lt;B&gt;,&lt;/B&gt;0&lt;B&gt;,&lt;/B&gt;1&lt;B&gt;),&lt;/B&gt;'No'&lt;B&gt;,&lt;/B&gt;'Yes'&lt;B&gt;)&lt;/B&gt; &lt;B&gt;as&lt;/B&gt; SHQS_T_Exempt&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This expression returns all fields as "Yes"&lt;/P&gt;&lt;P&gt;if&lt;B&gt;(&lt;/B&gt;match&lt;B&gt;(&lt;/B&gt;ysnSHQSExemptTemp&lt;B&gt;,&lt;/B&gt;'False'&lt;B&gt;,&lt;/B&gt;'True'&lt;B&gt;),&lt;/B&gt;'No'&lt;B&gt;,&lt;/B&gt;'Yes'&lt;B&gt;)&lt;/B&gt; &lt;B&gt;as&lt;/B&gt; SHQS_T_Exempt&lt;/P&gt;&lt;P&gt;Can you help please?&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 12:32:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155618#M31803</guid>
      <dc:creator />
      <dc:date>2011-01-31T12:32:33Z</dc:date>
    </item>
    <item>
      <title>Condition for Filter</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155619#M31804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the delay. I've barely had a spare moment all week. The match() function returns true if ANY of the items in the list match. So if all of your values are either 0 or 1, then you'll always get no for the first expression.&lt;/P&gt;&lt;P&gt;'False' and 'True' are string values, so won't match 0 or 1, so you always get 'Yes'. Replacing with false() and true() will work, but only by accident. What I mean by that is that true() is actually -1, but that means that a value of 1 will not match either false() or true(), and therefore go to your else, which is 'Yes'. So right results, but very poor logic.&lt;/P&gt;&lt;P&gt;I'd probaly just do this. Even though true() evaluates to -1, anything other than 0 will evaluate to true. So a value of 1 will be true and give you 'Yes', while a value of 0 will be false and give you 'No'.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if(ysnSHQSExemptTemp,'Yes','No') as SHQS_T_Exempt&lt;/P&gt;&lt;P&gt;Another approach that would be more similar to what you seem to be attempting is this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;pick(match(ysnSHQSExemptTemp,0,1),'No','Yes') as SHQS_T_Exempt&lt;/P&gt;&lt;P&gt;Match() will return the position of the first match. A value of 0 is in position 1. Pick() will return the value in the given position. The value of 'No' is in position 1. So you'll get 'No' for 0. Similarly, 1 is in position 2 in the match(), and position 2 is 'Yes' in the pick(). So you'll get 'Yes' for 1. To me it's more complicated than it needs to be, but it seemed worth mentioning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 00:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155619#M31804</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-04T00:54:14Z</dc:date>
    </item>
    <item>
      <title>Condition for Filter</title>
      <link>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155620#M31805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi john&lt;/P&gt;&lt;P&gt;Thanks for the solution and especially for explaining the logic behind it -&lt;/P&gt;&lt;P&gt;works 100%&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 10:16:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Condition-for-Filter/m-p/155620#M31805</guid>
      <dc:creator />
      <dc:date>2011-02-07T10:16:15Z</dc:date>
    </item>
  </channel>
</rss>

