<?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: The opposite expression evaluation occurs in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/The-opposite-expression-evaluation-occurs/m-p/471367#M176054</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Gysbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 Mar 2013 07:32:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-24T07:32:06Z</dc:date>
    <item>
      <title>The opposite expression evaluation occurs</title>
      <link>https://community.qlik.com/t5/QlikView/The-opposite-expression-evaluation-occurs/m-p/471365#M176052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe I have been looking at this code for too long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt; if(Trim(QTrnType)&amp;lt;&amp;gt;'IC',QQty,-1*QQty) as UQty,&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the above example the output of the expression looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QTrnType is IC, QQty is 1 and UQty is -1&lt;/P&gt;&lt;P&gt;QTrnType is IN, QQty is 1 and UQty is 1&lt;/P&gt;&lt;P&gt;QTrnType is IT, QQty is 2 and UQty is 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt; if(Trim(QTrnType)='IC',QQty,-1*QQty) as UQty,&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above example the opposite happens????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QTrnType is IC, QQty is 1 and UQty is 1&lt;/P&gt;&lt;P&gt;QTrnType is IN, QQty is 1 and UQty is -1&lt;/P&gt;&lt;P&gt;QTrnType is IT, QQty is 2 and UQty is -2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would expect the output of these examples to be the opposite - to be + and visa versa???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 07:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/The-opposite-expression-evaluation-occurs/m-p/471365#M176052</guid>
      <dc:creator />
      <dc:date>2013-03-23T07:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: The opposite expression evaluation occurs</title>
      <link>https://community.qlik.com/t5/QlikView/The-opposite-expression-evaluation-occurs/m-p/471366#M176053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The if statement works like this: &lt;/P&gt;&lt;P&gt;If( condition, expression1, expression2)&lt;/P&gt;&lt;P&gt;if condition is true then evaluate expression1, if condition is false then evaluate expression2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;if(Trim(QTrnType)&amp;lt;&amp;gt;'IC',QQty,-1*QQty) as UQty&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;QTrnType is IC&lt;/SPAN&gt; -&amp;gt; t&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;rim(QTrnType)&amp;lt;&amp;gt;'IC'&lt;/SPAN&gt; is False -&amp;gt; multiply QQty with -1 -&amp;gt; result: -1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;if(Trim(QTrnType)='IC',QQty,-1*QQty) as UQty&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;QTrnType is IC&lt;/SPAN&gt; -&amp;gt; t&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;rim(QTrnType)='IC'&lt;/SPAN&gt; is True-&amp;gt; take QQty -&amp;gt; result: 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;gt; is the opposite of =, so the results are the opposites too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 10:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/The-opposite-expression-evaluation-occurs/m-p/471366#M176053</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-23T10:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: The opposite expression evaluation occurs</title>
      <link>https://community.qlik.com/t5/QlikView/The-opposite-expression-evaluation-occurs/m-p/471367#M176054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Gysbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Mar 2013 07:32:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/The-opposite-expression-evaluation-occurs/m-p/471367#M176054</guid>
      <dc:creator />
      <dc:date>2013-03-24T07:32:06Z</dc:date>
    </item>
  </channel>
</rss>

