<?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 How to calculate Null value as 0 in expression while using sum or aggr function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-calculate-Null-value-as-0-in-expression-while-using-sum/m-p/194399#M55313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to check and replace the null values with 0 where the expression results are returning the null values from the aggr(sum) function.&lt;/P&gt;&lt;P&gt;For example: I am trying to calculate if(aggr(sum(sales), customer &amp;gt; 0 and sum(sales, customer &amp;lt;= 0, 'LOST') now here the condition is not getting true since there may be NULL values obtained by the result of this expression. So I would like to replace the null values with zeros so that this condition is always evaluated as true when values are zero or null.&lt;/P&gt;&lt;P&gt;I hope you got my problem. Please advise the solution asap.&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Sajid Mahmood&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jun 2010 20:26:07 GMT</pubDate>
    <dc:creator>Sajid_Mahmood</dc:creator>
    <dc:date>2010-06-18T20:26:07Z</dc:date>
    <item>
      <title>How to calculate Null value as 0 in expression while using sum or aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-Null-value-as-0-in-expression-while-using-sum/m-p/194399#M55313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to check and replace the null values with 0 where the expression results are returning the null values from the aggr(sum) function.&lt;/P&gt;&lt;P&gt;For example: I am trying to calculate if(aggr(sum(sales), customer &amp;gt; 0 and sum(sales, customer &amp;lt;= 0, 'LOST') now here the condition is not getting true since there may be NULL values obtained by the result of this expression. So I would like to replace the null values with zeros so that this condition is always evaluated as true when values are zero or null.&lt;/P&gt;&lt;P&gt;I hope you got my problem. Please advise the solution asap.&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Sajid Mahmood&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 20:26:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-Null-value-as-0-in-expression-while-using-sum/m-p/194399#M55313</guid>
      <dc:creator>Sajid_Mahmood</dc:creator>
      <dc:date>2010-06-18T20:26:07Z</dc:date>
    </item>
    <item>
      <title>How to calculate Null value as 0 in expression while using sum or aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-calculate-Null-value-as-0-in-expression-while-using-sum/m-p/194400#M55314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use:&lt;/P&gt;&lt;P&gt;If(isnull(value), 0, value)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;If(isnull(sum(value)), 0, sum(value))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jun 2010 20:36:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-calculate-Null-value-as-0-in-expression-while-using-sum/m-p/194400#M55314</guid>
      <dc:creator />
      <dc:date>2010-06-18T20:36:12Z</dc:date>
    </item>
  </channel>
</rss>

