<?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: Check for nulls vs zero values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Check-for-nulls-vs-zero-values/m-p/428826#M159830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might be wrong but I don't think you can have sum(of something) return a null value. But you could also do a count so Count(of something) if something is null will get you a 0, if something is zero then you will get 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can do something like if(count(something)=0, then do something because its null, sum(something)).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jan 2013 02:18:42 GMT</pubDate>
    <dc:creator>danielrozental</dc:creator>
    <dc:date>2013-01-17T02:18:42Z</dc:date>
    <item>
      <title>Check for nulls vs zero values</title>
      <link>https://community.qlik.com/t5/QlikView/Check-for-nulls-vs-zero-values/m-p/428825#M159829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In an expression, if you do a sum(X) a 0 value will be returned if data exists and the sum of X = 0 OR no data exists at all.&amp;nbsp; I'm trying to determine if there is a way to add some logic in my expression so a 0 value will be returned if data exists and the sum of X = 0 and a NULL value will be returned if no data exists at all.&amp;nbsp; This way I can use the isnull() function to display the zero but not show the null fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that makes sense.&amp;nbsp; Thanks for anything&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 00:58:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-for-nulls-vs-zero-values/m-p/428825#M159829</guid>
      <dc:creator />
      <dc:date>2013-01-17T00:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Check for nulls vs zero values</title>
      <link>https://community.qlik.com/t5/QlikView/Check-for-nulls-vs-zero-values/m-p/428826#M159830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might be wrong but I don't think you can have sum(of something) return a null value. But you could also do a count so Count(of something) if something is null will get you a 0, if something is zero then you will get 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can do something like if(count(something)=0, then do something because its null, sum(something)).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 02:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-for-nulls-vs-zero-values/m-p/428826#M159830</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2013-01-17T02:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Check for nulls vs zero values</title>
      <link>https://community.qlik.com/t5/QlikView/Check-for-nulls-vs-zero-values/m-p/428827#M159831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect Daniel thank you, the count() function works great.&amp;nbsp; You are right the sum() always returns a zero while the count() will return a null!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 19:03:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-for-nulls-vs-zero-values/m-p/428827#M159831</guid>
      <dc:creator />
      <dc:date>2013-01-17T19:03:53Z</dc:date>
    </item>
  </channel>
</rss>

