<?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: SUM of null in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SUM-of-null-in-script/m-p/623353#M229392</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you cannot unfortunately, because sum gives always 0 even with null values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Feb 2014 10:52:03 GMT</pubDate>
    <dc:creator>alexandros17</dc:creator>
    <dc:date>2014-02-24T10:52:03Z</dc:date>
    <item>
      <title>SUM of null in script</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-of-null-in-script/m-p/623352#M229391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field with normal values and null values. When perform a group by in the script with sum(field), the result returns 0 even if the values are null. I even tried placing a 'N' when null, but i get the same result sum(field)=0 for these values. I want the sum of null values to be a null value as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I have this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for values=null or 'N', sum(field)=0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for values=null or 'N', sum(field)=Null or 'N'&lt;STRONG&gt; and not 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bogdan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 10:39:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-of-null-in-script/m-p/623352#M229391</guid>
      <dc:creator>qlikplaut</dc:creator>
      <dc:date>2014-02-24T10:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: SUM of null in script</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-of-null-in-script/m-p/623353#M229392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you cannot unfortunately, because sum gives always 0 even with null values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 10:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-of-null-in-script/m-p/623353#M229392</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-02-24T10:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: SUM of null in script</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-of-null-in-script/m-p/623354#M229393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, Sum(field) &lt;EM style="text-decoration: underline;"&gt;&lt;STRONG&gt;is&lt;/STRONG&gt;&lt;/EM&gt; 0 if field is NULL... So QlikView does the right thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your Group By in the script looks like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dimension,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Number) as NumberSum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From ... Group By Dimension ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you might get NumberSum=0 for some values of "Dimension". If you want to omit these records, you should simply add a Where clause, e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dimension,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Number) as NumberSum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From ... Where IsNum(Number) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Group By Dimension ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 15:21:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-of-null-in-script/m-p/623354#M229393</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-02-24T15:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: SUM of null in script</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-of-null-in-script/m-p/2530791#M1226662</link>
      <description>&lt;P&gt;I have a similar case:&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Dimension,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Sum(Number1) as NumberSum1&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Sum(Number2) as NumberSum2&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Sum(Number3) as NumberSum3&lt;BR /&gt;&amp;nbsp; &amp;nbsp;From ... Group By Dimension ;&lt;/P&gt;&lt;P&gt;But in my case any of the fields NumberX can be empty when the others are not&lt;BR /&gt;In that case I cannot add Where clause&lt;/P&gt;&lt;P&gt;What else could I do ?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 10:28:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-of-null-in-script/m-p/2530791#M1226662</guid>
      <dc:creator>JuMo</dc:creator>
      <dc:date>2025-09-15T10:28:08Z</dc:date>
    </item>
  </channel>
</rss>

