<?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: If condition giving incorrect result in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93518#M15050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Try this,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if ([status] &amp;lt;&amp;gt;3&amp;nbsp; or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[status]&amp;lt;&amp;gt;&lt;/SPAN&gt;4, 'Unprocessed', 'Processed')&amp;nbsp; as Flag&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jun 2018 06:20:36 GMT</pubDate>
    <dc:creator>ashwin_r</dc:creator>
    <dc:date>2018-06-29T06:20:36Z</dc:date>
    <item>
      <title>If condition giving incorrect result</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93514#M15046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing below logic so that when status is not equal to 3 or 4 it should display Unprocessed else Processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ([statut] &amp;lt;&amp;gt;'3'&amp;nbsp; or '4', 'Unprocessed', 'Processed')&amp;nbsp; as Flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in qlikview after I write the above condition, I get Unprocessed if Status=3, which is wrong according to this above logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me with the above issue?whether my calculation wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 05:02:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93514#M15046</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-29T05:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: If condition giving incorrect result</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93515#M15047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try this =if(wildmatch(status,'3','4')&amp;gt;=1,'&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Processed&lt;/SPAN&gt;','&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Unprocessed&lt;/SPAN&gt;')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 05:18:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93515#M15047</guid>
      <dc:creator>keerthika</dc:creator>
      <dc:date>2018-06-29T05:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: If condition giving incorrect result</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93516#M15048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if ( &lt;STRONG&gt;Not Match&lt;/STRONG&gt; ([statut], '3', '4'), 'Unprocessed', 'Processed')&amp;nbsp; as Flag&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 05:45:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93516#M15048</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-06-29T05:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: If condition giving incorrect result</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93517#M15049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check this whether it is useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;status:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt; if(Status = '3' or Status = '4', 'UnProcessed')&amp;nbsp; as Flag &lt;/P&gt;&lt;P&gt;Resident status;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt; if(Status &amp;lt;&amp;gt; '3' or Status &amp;lt;&amp;gt; '4', 'Processed')&amp;nbsp; as Flag &lt;/P&gt;&lt;P&gt;Resident status;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 05:47:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93517#M15049</guid>
      <dc:creator>gayathri_nagara</dc:creator>
      <dc:date>2018-06-29T05:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: If condition giving incorrect result</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93518#M15050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Try this,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if ([status] &amp;lt;&amp;gt;3&amp;nbsp; or &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[status]&amp;lt;&amp;gt;&lt;/SPAN&gt;4, 'Unprocessed', 'Processed')&amp;nbsp; as Flag&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 06:20:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93518#M15050</guid>
      <dc:creator>ashwin_r</dc:creator>
      <dc:date>2018-06-29T06:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: If condition giving incorrect result</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93519#M15051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=if(Match(status,'3','4'),'Processed','Unprocessed')&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 06:20:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93519#M15051</guid>
      <dc:creator>dapostolopoylos</dc:creator>
      <dc:date>2018-06-29T06:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: If condition giving incorrect result</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93520#M15052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;due to operator precedence, your formula is equivalent to&lt;/P&gt;&lt;P&gt;[statut] &amp;lt;&amp;gt;('3'&amp;nbsp; or '4')&lt;/P&gt;&lt;P&gt;try with match function for example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 07:03:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93520#M15052</guid>
      <dc:creator>olivierrobin</dc:creator>
      <dc:date>2018-06-29T07:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: If condition giving incorrect result</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93521#M15053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Olivier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Olivier Robin wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;hello&lt;/P&gt;
&lt;P&gt;due to operator precedence, your formula is equivalent to&lt;/P&gt;
&lt;P&gt;[statut] &amp;lt;&amp;gt;('3'&amp;nbsp; or '4')&lt;/P&gt;
&lt;P&gt;try with match function for example&lt;/P&gt;




&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I guess that's not correct. In fact,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if ([statut] &amp;lt;&amp;gt;'3'&amp;nbsp; or '4'&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;is being evaluated as: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if ( &lt;STRONG&gt;([statut] &amp;lt;&amp;gt;'3')&lt;/STRONG&gt;&amp;nbsp; or &lt;STRONG&gt;'4'&lt;/STRONG&gt; ..........., i.e it is evaluating two separate conditions, one for [statut]&amp;lt;&amp;gt;'3'&amp;nbsp; and second one just '4', which is actually TRUE always (any number except '0' is 'true'). Therefore, the condition effectively becomes :&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if ( &lt;STRONG&gt;([statut] &amp;lt;&amp;gt;'3')&lt;/STRONG&gt;&amp;nbsp; or &lt;STRONG&gt;TRUE() , ...&lt;/STRONG&gt; I.e. - 'something OR TRUE' - which &lt;STRONG&gt;would always return a TRUE.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 07:26:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-giving-incorrect-result/m-p/93521#M15053</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-06-29T07:26:48Z</dc:date>
    </item>
  </channel>
</rss>

