<?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 Multiple aggr in a straight table expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214953#M68438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct - you cannot use a plus sign to add a number and a null value (the result is null). However, you CAN use rangesum(), and all null values in the sum will be treated as 0. So I suspect that this will work:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;RANGESUM(AGGR(NODISTINCT sum({&amp;lt;Month={$(=$(Periode)-1)}&amp;gt;}EFFECTIF),CODE_ACL)&lt;BR /&gt; ,AGGR(NODISTINCT sum({&amp;lt;Month={$(Periode))}&amp;gt;} EFFECTIF),CODE_ACL))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jul 2010 00:43:26 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-07-07T00:43:26Z</dc:date>
    <item>
      <title>Multiple aggr in a straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214950#M68435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AGGR(NODISTINCT sum({&amp;lt;Month={$(=$(Periode)-1)}&amp;gt;}EFFECTIF),CODE_ACL) +&lt;/P&gt;&lt;P&gt;AGGR(NODISTINCT sum({&amp;lt;Month={$(Periode))}&amp;gt;}EFFECTIF),CODE_ACL)&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a straight table with CODE_ACL as unique dimension, this expression only delivers a result for CODE_ACL having a numeric value in first and second AGGR. If one of the AGGR has a NULL or 0 result, the expression becomes NULL even if the other AGGR result is a number.&lt;/P&gt;&lt;P&gt;Is there anybody to explain this ?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Olivier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 23:27:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214950#M68435</guid>
      <dc:creator />
      <dc:date>2010-07-05T23:27:12Z</dc:date>
    </item>
    <item>
      <title>Multiple aggr in a straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214951#M68436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't know whay that happens, but apparently you can not sum a number and a null value. When that happens to me, what I do is force the null value to become a number, like this:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;RangeMax(Expr1, 0) + RangeMax(Expr2,0)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;That way, whenever the Expr1 or Expr2 returns null, it will be taken as 0. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Mike.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 23:44:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214951#M68436</guid>
      <dc:creator>mike_garcia</dc:creator>
      <dc:date>2010-07-05T23:44:24Z</dc:date>
    </item>
    <item>
      <title>Multiple aggr in a straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214952#M68437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;I dealt the problem with an if statement testing if my expr was &amp;gt;0. In case of false the expr value was converted to 0. Your solution is better as it shortens the expression.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Olivier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 23:51:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214952#M68437</guid>
      <dc:creator />
      <dc:date>2010-07-05T23:51:18Z</dc:date>
    </item>
    <item>
      <title>Multiple aggr in a straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214953#M68438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct - you cannot use a plus sign to add a number and a null value (the result is null). However, you CAN use rangesum(), and all null values in the sum will be treated as 0. So I suspect that this will work:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;RANGESUM(AGGR(NODISTINCT sum({&amp;lt;Month={$(=$(Periode)-1)}&amp;gt;}EFFECTIF),CODE_ACL)&lt;BR /&gt; ,AGGR(NODISTINCT sum({&amp;lt;Month={$(Periode))}&amp;gt;} EFFECTIF),CODE_ACL))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 00:43:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214953#M68438</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-07T00:43:26Z</dc:date>
    </item>
    <item>
      <title>Multiple aggr in a straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214954#M68439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 08:27:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-aggr-in-a-straight-table-expression/m-p/214954#M68439</guid>
      <dc:creator />
      <dc:date>2010-07-08T08:27:38Z</dc:date>
    </item>
  </channel>
</rss>

