<?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 Sum only if positive in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-only-if-positive/m-p/188060#M51485</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps something like this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum(rangemax(0,"total order"-"total received"))&lt;/P&gt;&lt;P&gt;Or this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum(if("total order"-"total received"&amp;gt;=0,"total order"-"total received"))&lt;/P&gt;&lt;P&gt;But for higher chart performance, you could instead do the if() in the script:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if("total order"-"total received"&amp;gt;=0,"total order"-"total received") as "positive open order"&lt;/P&gt;&lt;P&gt;Then just sum("positive open order") in the chart.&lt;/P&gt;&lt;P&gt;Other approaches are possible as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jun 2010 00:29:30 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-06-15T00:29:30Z</dc:date>
    <item>
      <title>Sum only if positive</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-only-if-positive/m-p/188059#M51484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm working with a table that has total order and total received. i created a calculated expression "total order - total received = open order".&lt;/P&gt;&lt;P&gt;However, there may be instances where the result is negative. how can i exclude negative values from my pivot table?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jun 2010 23:57:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-only-if-positive/m-p/188059#M51484</guid>
      <dc:creator />
      <dc:date>2010-06-14T23:57:14Z</dc:date>
    </item>
    <item>
      <title>Sum only if positive</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-only-if-positive/m-p/188060#M51485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps something like this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum(rangemax(0,"total order"-"total received"))&lt;/P&gt;&lt;P&gt;Or this?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sum(if("total order"-"total received"&amp;gt;=0,"total order"-"total received"))&lt;/P&gt;&lt;P&gt;But for higher chart performance, you could instead do the if() in the script:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if("total order"-"total received"&amp;gt;=0,"total order"-"total received") as "positive open order"&lt;/P&gt;&lt;P&gt;Then just sum("positive open order") in the chart.&lt;/P&gt;&lt;P&gt;Other approaches are possible as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jun 2010 00:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-only-if-positive/m-p/188060#M51485</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-06-15T00:29:30Z</dc:date>
    </item>
  </channel>
</rss>

