<?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 Sum NULL fields and return NULL expression? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533553#M199262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having some trouble getting the SUM of a NULL field to return a NULL value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data model is very simple.&amp;nbsp; I have data that is entered manually to our DB on a monthly basis, and this is always done at the end of the month.&amp;nbsp; The Numerator field is NULL until this data is entered, but it appears that the numerator is ZERO when you look at the table in QVW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;CLABSI Infections&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;CAUTI Infections&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wan this to display:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLABSI Infections&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;CAUTI Infections&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression is this:&lt;/P&gt;&lt;P&gt;=Sum(Numerator)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I adjust this expression to account for these NULL values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Sep 2013 19:19:30 GMT</pubDate>
    <dc:creator>phcaptjim</dc:creator>
    <dc:date>2013-09-17T19:19:30Z</dc:date>
    <item>
      <title>Sum NULL fields and return NULL expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533553#M199262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having some trouble getting the SUM of a NULL field to return a NULL value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data model is very simple.&amp;nbsp; I have data that is entered manually to our DB on a monthly basis, and this is always done at the end of the month.&amp;nbsp; The Numerator field is NULL until this data is entered, but it appears that the numerator is ZERO when you look at the table in QVW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;CLABSI Infections&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;CAUTI Infections&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wan this to display:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLABSI Infections&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;CAUTI Infections&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression is this:&lt;/P&gt;&lt;P&gt;=Sum(Numerator)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I adjust this expression to account for these NULL values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 19:19:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533553#M199262</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2013-09-17T19:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sum NULL fields and return NULL expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533554#M199263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I think its just a design issue. It has to do with the fact that QlikView interprets null and nothing as different things (they actually are). You may want to check the following post in order to understand the difference between both null and nothing: &lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-3155"&gt;http://community.qlik.com/docs/DOC-3155&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding what you want to do, you can make a validation in your expression with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(nullcount(CLABSI Infections), null(), CLABSI Infections), so the zeros in CLABSI and CAUTI Infections will be replaced with ' - ' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 23:00:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533554#M199263</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2013-09-17T23:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sum NULL fields and return NULL expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533555#M199264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Thanks for the reply Jamie.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;I should have been more specific with my original post, but my expression actually has set analysis, so I am not sure NULLCOUNT will work with this?&amp;nbsp; Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;SUM({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Calendar Month Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={'$(=date(max([Metric Date]),'YYYY-MM'))'}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[NUMERATOR]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 23:53:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533555#M199264</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2013-09-17T23:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sum NULL fields and return NULL expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533556#M199265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be something like this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;If(IsNull(MAX({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[Calendar Month Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={'$(=date(max([Metric Date]),'YYYY-MM'))'}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[NUMERATOR]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)), Null(), &lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;SUM({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[Calendar Month Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={'$(=date(max([Metric Date]),'YYYY-MM'))'}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;[NUMERATOR]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 00:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533556#M199265</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-09-18T00:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sum NULL fields and return NULL expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533557#M199266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Celam, that works fine.&amp;nbsp; The easy solution!&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 00:39:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-NULL-fields-and-return-NULL-expression/m-p/533557#M199266</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2013-09-18T00:39:10Z</dc:date>
    </item>
  </channel>
</rss>

