<?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( Null() )= 0 when it should be Null() in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sum-Null-0-when-it-should-be-Null/m-p/1594846#M43772</link>
    <description>&lt;P&gt;There are a few things you could do like:&lt;/P&gt;&lt;P&gt;You could put it within an if statement:&lt;/P&gt;&lt;P&gt;if (A=Null(),Null(),sum(A))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I personally prefer replacing Null Values with a string like '#' within the Script Editor&lt;/P&gt;&lt;P&gt;This way this problem won't even appear:&lt;/P&gt;&lt;P&gt;if (A=Null(),'#',A) as A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;</description>
    <pubDate>Sun, 23 Jun 2019 10:47:54 GMT</pubDate>
    <dc:creator>H_Julian</dc:creator>
    <dc:date>2019-06-23T10:47:54Z</dc:date>
    <item>
      <title>Sum( Null() )= 0 when it should be Null()</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Null-0-when-it-should-be-Null/m-p/1594526#M43741</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Qlik when it makes a sum of null values it puts zero (0) when I suposse it should show null.&lt;/P&gt;&lt;P&gt;I need to show when the sum is 0 show 0 and when all values are null show null() (-).&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works multiplying and dividing by the count, but I hope there is a better way.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;A= Null ()&lt;/P&gt;&lt;P&gt;Sum( A )=0&lt;/P&gt;&lt;P&gt;Sum (A) * Count( A) / Count (A)= Null()&lt;/P&gt;&lt;P&gt;Any better way?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:31:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Null-0-when-it-should-be-Null/m-p/1594526#M43741</guid>
      <dc:creator>Luis</dc:creator>
      <dc:date>2024-11-16T05:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sum( Null() )= 0 when it should be Null()</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-Null-0-when-it-should-be-Null/m-p/1594846#M43772</link>
      <description>&lt;P&gt;There are a few things you could do like:&lt;/P&gt;&lt;P&gt;You could put it within an if statement:&lt;/P&gt;&lt;P&gt;if (A=Null(),Null(),sum(A))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I personally prefer replacing Null Values with a string like '#' within the Script Editor&lt;/P&gt;&lt;P&gt;This way this problem won't even appear:&lt;/P&gt;&lt;P&gt;if (A=Null(),'#',A) as A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2019 10:47:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-Null-0-when-it-should-be-Null/m-p/1594846#M43772</guid>
      <dc:creator>H_Julian</dc:creator>
      <dc:date>2019-06-23T10:47:54Z</dc:date>
    </item>
  </channel>
</rss>

