<?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 Remove NULL values that are being counted in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Remove-NULL-values-that-are-being-counted/m-p/156528#M32371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( {$&amp;lt;R_SALE_START_DATE = {"&amp;gt;=$(TY_YTD_Start)&amp;lt;=$(=date(REPORT_YTD, 'YYYY-MM-DD'))"}&amp;gt;} DISTINCT&lt;/P&gt;&lt;P&gt;IF(aggr(min(distinct R_SALE_START_DATE), R_CLEAN_CONTACT_WID)= R_SALE_START_DATE,&lt;/P&gt;&lt;P&gt;R_CLEAN_CONTACT_WID))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting an incorrect result because there are null values for min(R_SALE_START_DATE) which are being counted. So I tried something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( {$&amp;lt;R_SALE_START_DATE = {"&amp;gt;=$(TY_YTD_Start)&amp;lt;=$(=date(REPORT_YTD, 'YYYY-MM-DD'))"}&amp;gt;} DISTINCT&lt;/P&gt;&lt;P&gt;IF(aggr(min(distinct R_SALE_START_DATE), R_CLEAN_CONTACT_WID)= R_SALE_START_DATE,&lt;/P&gt;&lt;P&gt;IF(isnull(aggr(min(distinct R_SALE_START_DATE), R_CLEAN_CONTACT_WID)=0,&lt;/P&gt;&lt;P&gt;R_CLEAN_CONTACT_WID)))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;However, QV still counts the null dates as being a match for R_SALE_START_DATE when it isn't. I.e it has not fixed the null problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? Does AGGR treat Nulls differently or something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GPC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Mar 2011 11:34:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-11T11:34:02Z</dc:date>
    <item>
      <title>Remove NULL values that are being counted</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-NULL-values-that-are-being-counted/m-p/156528#M32371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( {$&amp;lt;R_SALE_START_DATE = {"&amp;gt;=$(TY_YTD_Start)&amp;lt;=$(=date(REPORT_YTD, 'YYYY-MM-DD'))"}&amp;gt;} DISTINCT&lt;/P&gt;&lt;P&gt;IF(aggr(min(distinct R_SALE_START_DATE), R_CLEAN_CONTACT_WID)= R_SALE_START_DATE,&lt;/P&gt;&lt;P&gt;R_CLEAN_CONTACT_WID))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting an incorrect result because there are null values for min(R_SALE_START_DATE) which are being counted. So I tried something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count( {$&amp;lt;R_SALE_START_DATE = {"&amp;gt;=$(TY_YTD_Start)&amp;lt;=$(=date(REPORT_YTD, 'YYYY-MM-DD'))"}&amp;gt;} DISTINCT&lt;/P&gt;&lt;P&gt;IF(aggr(min(distinct R_SALE_START_DATE), R_CLEAN_CONTACT_WID)= R_SALE_START_DATE,&lt;/P&gt;&lt;P&gt;IF(isnull(aggr(min(distinct R_SALE_START_DATE), R_CLEAN_CONTACT_WID)=0,&lt;/P&gt;&lt;P&gt;R_CLEAN_CONTACT_WID)))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;However, QV still counts the null dates as being a match for R_SALE_START_DATE when it isn't. I.e it has not fixed the null problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? Does AGGR treat Nulls differently or something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GPC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 11:34:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-NULL-values-that-are-being-counted/m-p/156528#M32371</guid>
      <dc:creator />
      <dc:date>2011-03-11T11:34:02Z</dc:date>
    </item>
  </channel>
</rss>

