<?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: Why does Sum() and Count() never equate to NULL? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036891#M936560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Henric talks about the reasoning behind in&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/206310"&gt;Set analysis returns 0, for null records&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Feb 2016 23:24:54 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-02-20T23:24:54Z</dc:date>
    <item>
      <title>Why does Sum() and Count() never equate to NULL?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036884#M936553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to the Help Guide (in the Aggregation Functions section):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"If no value is found, NULL is returned for all Aggregation Functions, except Sum and Count which both return 0."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm just curious if anyone knows the reasoning behind always making Sum and Count 0. I can think of numerous ways that it would be beneficial to let them equate to null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 15:44:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036884#M936553</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2016-02-15T15:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Sum() and Count() never equate to NULL?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036885#M936554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please look into the below link for various ways of handling NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-3155"&gt;NULL handling in QlikView&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 15:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036885#M936554</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2016-02-15T15:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Sum() and Count() never equate to NULL?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036886#M936555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A Count() returning zero when no value is found seems quite ok to me. Can you tell one of the scenarios you want NULL instead?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum() might be a different case, one can definitely find arguments pro returning NULL when no values found.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 16:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036886#M936555</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-15T16:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Sum() and Count() never equate to NULL?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036887#M936556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree that it makes sense for Count(), but if I wanted to do a sum of values that can either be&amp;nbsp; &amp;gt;0, 0 (meaning that this is the actual value), or NULL (record is missing), then I would want the sum to be NULL if all of the values were NULL. That way I could tell that there isn't a value for that field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 17:58:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036887#M936556</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2016-02-15T17:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Sum() and Count() never equate to NULL?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036888#M936557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have read those articles before, but I wasn't able to find a reason for sum to always equate to 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 18:02:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036888#M936557</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2016-02-15T18:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Sum() and Count() never equate to NULL?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036889#M936558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see your point regarding Sum().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a workaround, you can try something like&lt;/P&gt;&lt;P&gt;=If(NumericCount(FIELD), Sum(FIELD), NULL())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a shortcut, you can create a variable in the script:&lt;/P&gt;&lt;P&gt;SET MySum = If(NumericCount($1), Sum($1), NULL() );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can call it in any expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(MySum(FIELD))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 18:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036889#M936558</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-15T18:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Sum() and Count() never equate to NULL?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036890#M936559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good advice! I've been doing a similar workaround in my expressions, but I'd still like to know what the thought process behind forcing zero values is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 19:30:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036890#M936559</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2016-02-15T19:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Sum() and Count() never equate to NULL?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036891#M936560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Henric talks about the reasoning behind in&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/206310"&gt;Set analysis returns 0, for null records&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Feb 2016 23:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036891#M936560</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-02-20T23:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Sum() and Count() never equate to NULL?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036892#M936561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I s&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;uggest you look at &lt;/SPAN&gt;&lt;A _jive_internal="true" data-containerid="2588" data-containertype="37" data-objectid="3897" data-objecttype="38" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/09/01/scales-of-measurement" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;Scales of Measurement&lt;/A&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;. &lt;/SPAN&gt;&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;BR /&gt;&lt;/SPAN&gt;&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;The Sum() function should only be used for Ratios/Amounts, and for these a zero is equal to an absence. Hence, it is more logical to have Sum() return a zero than a NULL.&lt;/SPAN&gt;&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;BR /&gt;&lt;/SPAN&gt;&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;HIC&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2016 10:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-Sum-and-Count-never-equate-to-NULL/m-p/1036892#M936561</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2016-02-22T10:28:49Z</dc:date>
    </item>
  </channel>
</rss>

