<?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: Set Analysis return 0 value even if there is no value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-return-0-value-even-if-there-is-no-value/m-p/907489#M985559</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this is QV standard behaviour and I personally don't see anything wrong with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you absolutely want NULL returned, you might be able to check the number of records, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if( Count( {&amp;lt;&lt;EM&gt;SetExpression&lt;/EM&gt;&amp;gt;} ID), Sum({&amp;lt;&lt;EM&gt;SetExpression&lt;/EM&gt;&amp;gt;} IDValue), NULL() )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Aug 2015 17:07:57 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-08-03T17:07:57Z</dc:date>
    <item>
      <title>Set Analysis return 0 value even if there is no value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-return-0-value-even-if-there-is-no-value/m-p/907488#M985558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an expression with set analysis and it works perfectly fine: The set check the calendar and return the latest value according to the selections.&lt;/P&gt;&lt;P&gt;The issue start when I move my calendar to a period in the past where there are no value for that metric. It should return me a null but it return me a 0.&lt;/P&gt;&lt;P&gt;Summarizing the expression go against a non existing record and return a 0 instead of a null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me with this?&lt;/P&gt;&lt;P&gt;tks,&lt;/P&gt;&lt;P&gt;fb&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Aug 2015 23:13:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-return-0-value-even-if-there-is-no-value/m-p/907488#M985558</guid>
      <dc:creator />
      <dc:date>2015-08-02T23:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis return 0 value even if there is no value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-return-0-value-even-if-there-is-no-value/m-p/907489#M985559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this is QV standard behaviour and I personally don't see anything wrong with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you absolutely want NULL returned, you might be able to check the number of records, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if( Count( {&amp;lt;&lt;EM&gt;SetExpression&lt;/EM&gt;&amp;gt;} ID), Sum({&amp;lt;&lt;EM&gt;SetExpression&lt;/EM&gt;&amp;gt;} IDValue), NULL() )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 17:07:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-return-0-value-even-if-there-is-no-value/m-p/907489#M985559</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-03T17:07:57Z</dc:date>
    </item>
  </channel>
</rss>

