<?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: Any way to substitute zero in the case an aggregation is &amp;lt;0 in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Any-way-to-substitute-zero-in-the-case-an-aggregation-is-lt-0/m-p/97307#M6504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this solution was perfect&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Oct 2018 20:43:06 GMT</pubDate>
    <dc:creator>elijahabel</dc:creator>
    <dc:date>2018-10-31T20:43:06Z</dc:date>
    <item>
      <title>Any way to substitute zero in the case an aggregation is &lt;0</title>
      <link>https://community.qlik.com/t5/App-Development/Any-way-to-substitute-zero-in-the-case-an-aggregation-is-lt-0/m-p/97305#M6502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp; I have this issue where we have a complex aggregate calculation (High water mark), and we need to return 0 if the result of the aggregation is less than 0. Obviously i could throw it into an if statement, but i think performance-wise this is not a good idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calc:&lt;/P&gt;&lt;P&gt;Max(Aggr(RangeSum(Above(Sum(Value), 0, RowNo())), Department,(Date, (TEXT, Ascending)))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If statement solution:&lt;/P&gt;&lt;P&gt;if(&lt;SPAN style="font-size: 13.3333px;"&gt;Max(Aggr(RangeSum(Above(Sum(Value), 0, RowNo())), Department,(Date, (TEXT, Ascending))))) &amp;lt; 0, 0, &lt;SPAN style="font-size: 13.3333px;"&gt;Max(Aggr(RangeSum(Above(Sum(Value), 0, RowNo())), Department,(Date, (TEXT, Ascending))))))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Is there a cleaner way to accomplish this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 15:53:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Any-way-to-substitute-zero-in-the-case-an-aggregation-is-lt-0/m-p/97305#M6502</guid>
      <dc:creator>elijahabel</dc:creator>
      <dc:date>2018-10-31T15:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to substitute zero in the case an aggregation is &lt;0</title>
      <link>https://community.qlik.com/t5/App-Development/Any-way-to-substitute-zero-in-the-case-an-aggregation-is-lt-0/m-p/97306#M6503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Elijah. Maybe RangeMax&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;SPAN style="font-size: 13.3333330154419px;"&gt;RangeMax(&lt;/SPAN&gt;Max(Aggr(RangeSum(Above(Sum(Value), 0, RowNo())), Department,(Date, (TEXT, Ascending))))), 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 16:33:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Any-way-to-substitute-zero-in-the-case-an-aggregation-is-lt-0/m-p/97306#M6503</guid>
      <dc:creator>andrey_krylov</dc:creator>
      <dc:date>2018-10-31T16:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Any way to substitute zero in the case an aggregation is &lt;0</title>
      <link>https://community.qlik.com/t5/App-Development/Any-way-to-substitute-zero-in-the-case-an-aggregation-is-lt-0/m-p/97307#M6504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this solution was perfect&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2018 20:43:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Any-way-to-substitute-zero-in-the-case-an-aggregation-is-lt-0/m-p/97307#M6504</guid>
      <dc:creator>elijahabel</dc:creator>
      <dc:date>2018-10-31T20:43:06Z</dc:date>
    </item>
  </channel>
</rss>

