<?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: How to compute the net profit amount by oad script ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-compute-the-net-profit-amount-by-oad-script/m-p/1696064#M592839</link>
    <description>&lt;P&gt;Hi, I don't know what you mean as the first is working fine.&lt;/P&gt;&lt;P&gt;That code assigns the string 'rEVENUE_P' to the field&amp;nbsp;rEVENUE_P, that's the value it has: a string. Same for&amp;nbsp;&lt;SPAN&gt;cOG_P field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So you cant do math operations with strings&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe with:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rangesum(If([GL_CODE_]&amp;gt;=5000001 and [GL_CODE_]&amp;lt;=5999999,Amount)
,-If([GL_CODE_]&amp;gt;=6000001 and [GL_CODE_]&amp;lt;=6999999,Amount) as [nET_P],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2020 10:23:09 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2020-04-23T10:23:09Z</dc:date>
    <item>
      <title>How to compute the net profit amount by oad script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compute-the-net-profit-amount-by-oad-script/m-p/1695952#M592838</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I have below load script working fine :-&lt;BR /&gt;If([GL_CODE_]&amp;gt;=5000001 and [GL_CODE_]&amp;lt;=5999999,'rEVENUE_P') as [rEVENUE_P],&lt;BR /&gt;If([GL_CODE_]&amp;gt;=6000001 and [GL_CODE_]&amp;lt;=6999999,'cOG_P') as [cOG_P],&lt;BR /&gt;&lt;BR /&gt;I try to make use of load script to compute the net profit amount as below :-&lt;BR /&gt;If([GL_CODE_]&amp;gt;=5000001 and [GL_CODE_]&amp;lt;=5999999,'rEVENUE_P')-&lt;BR /&gt;If([GL_CODE_]&amp;gt;=6000001 and [GL_CODE_]&amp;lt;=6999999,'cOG_P') as [nET_P],&lt;BR /&gt;&lt;BR /&gt;I get the return value = 0 which is wrong. Hope some one can advise me.&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 01:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compute-the-net-profit-amount-by-oad-script/m-p/1695952#M592838</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2020-04-23T01:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute the net profit amount by oad script ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compute-the-net-profit-amount-by-oad-script/m-p/1696064#M592839</link>
      <description>&lt;P&gt;Hi, I don't know what you mean as the first is working fine.&lt;/P&gt;&lt;P&gt;That code assigns the string 'rEVENUE_P' to the field&amp;nbsp;rEVENUE_P, that's the value it has: a string. Same for&amp;nbsp;&lt;SPAN&gt;cOG_P field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So you cant do math operations with strings&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe with:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Rangesum(If([GL_CODE_]&amp;gt;=5000001 and [GL_CODE_]&amp;lt;=5999999,Amount)
,-If([GL_CODE_]&amp;gt;=6000001 and [GL_CODE_]&amp;lt;=6999999,Amount) as [nET_P],&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 10:23:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compute-the-net-profit-amount-by-oad-script/m-p/1696064#M592839</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-04-23T10:23:09Z</dc:date>
    </item>
  </channel>
</rss>

