<?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 If condition is not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-condition-is-not-working/m-p/1923192#M1231959</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;below if condition is not working for me, kindly please suggest.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(Match(trim([Product Code]),'3')and [Product Code]='3', 'text', 'text1')&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;NR&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
    <dc:creator>NavinReddy</dc:creator>
    <dc:date>2026-01-26T16:26:21Z</dc:date>
    <item>
      <title>If condition is not working</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-is-not-working/m-p/1923192#M1231959</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;below if condition is not working for me, kindly please suggest.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(Match(trim([Product Code]),'3')and [Product Code]='3', 'text', 'text1')&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;NR&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-is-not-working/m-p/1923192#M1231959</guid>
      <dc:creator>NavinReddy</dc:creator>
      <dc:date>2026-01-26T16:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: If condition is not working</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-is-not-working/m-p/1923202#M1231964</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Trim function removes spaces near value, so I assume that you have spaces, for instance&lt;/P&gt;
&lt;P&gt;' 3' or ' 3 '&lt;/P&gt;
&lt;P&gt;In this case, the first part of your expression returns true because trim removes spaces and you get '3'&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Match(trim([Product Code]),'3')&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;But the second part returns false because the Product Code value still contains spaces&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;[Product Code]='3',&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You can just replace your condition by following:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;if(trim([Product Code]) = '3', 'text', 'text1')&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vitalii&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 08:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-is-not-working/m-p/1923202#M1231964</guid>
      <dc:creator>vchuprina</dc:creator>
      <dc:date>2022-04-27T08:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: If condition is not working</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-is-not-working/m-p/1923237#M1231967</link>
      <description>&lt;P&gt;Hi Vitalli,&lt;/P&gt;
&lt;P&gt;Thanks for your quick response, i tried with option but still not working. any other set analysis/other options.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if([Product Code]='3' or Match(trim([Product Code]),'3'),'text','text1')&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;NR&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 08:55:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-is-not-working/m-p/1923237#M1231967</guid>
      <dc:creator>NavinReddy</dc:creator>
      <dc:date>2022-04-27T08:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: If condition is not working</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-is-not-working/m-p/1923266#M1231970</link>
      <description>&lt;P&gt;Could you please share your result? I don't understand where you try to use this condition in the UI or in the script part.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vitalii&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 09:40:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-is-not-working/m-p/1923266#M1231970</guid>
      <dc:creator>vchuprina</dc:creator>
      <dc:date>2022-04-27T09:40:48Z</dc:date>
    </item>
  </channel>
</rss>

