<?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 SV:Null as Null not zero in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170115#M40657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you every body for the help. However non of the above mentioned formula seems working for me. I am trying to apply formula on pivot table. Data are being pulled using SQL and SQL has group by clause.&lt;/P&gt;&lt;P&gt;The following formula seems to be working for me at this time. However i really would like to avoid using if else formula in my expression. Is there any other way to avoid zero for nulls while using sum() function ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(count([Value]),Sum([Value] &lt;P&gt;))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Aug 2009 03:08:25 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-29T03:08:25Z</dc:date>
    <item>
      <title>Null as Null not zero</title>
      <link>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170111#M40653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having issue with expressions that have sum() function. All nulls are automatically converting to zero when I use sum() function to create an expression.&lt;/P&gt;&lt;P&gt;The only dirty solution I can find is using if else statement.&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;if (sum(Value)&amp;lt;&amp;gt;0,sum(Value))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Does any one know the good solution to my issue ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2009 21:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170111#M40653</guid>
      <dc:creator />
      <dc:date>2009-08-28T21:39:49Z</dc:date>
    </item>
    <item>
      <title>Null as Null not zero</title>
      <link>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170112#M40654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=if(sum(value)&amp;lt;&amp;gt;0,sum(value)) will not serve the purpose as it will avoid displyying real zero as well. &lt;IMG alt="Sad" src="http://community.qlik.com/emoticons/emotion-6.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2009 21:52:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170112#M40654</guid>
      <dc:creator />
      <dc:date>2009-08-28T21:52:14Z</dc:date>
    </item>
    <item>
      <title>SV:Null as Null not zero</title>
      <link>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170113#M40655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to calculate the fields within Value that are not null(or empty) with one of the following.&lt;/P&gt;&lt;P&gt;If value is empty:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;if((Value)&amp;lt;&amp;gt;'',sum(Value),Value)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If value is null:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;if(not isnull(Value),sum(Value),Value)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;//Jakob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2009 22:26:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170113#M40655</guid>
      <dc:creator />
      <dc:date>2009-08-28T22:26:09Z</dc:date>
    </item>
    <item>
      <title>SV:Null as Null not zero</title>
      <link>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170114#M40656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So if ALL values being summed are null, you want the sum to be null instead of 0? This should work:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;if(sum(len(value))&amp;gt;0,sum(value))&lt;/P&gt;&lt;P&gt;The len(value) should be 0 for null, and &amp;gt;0 for anything non-null. So if sum(len(value))&amp;gt;0, it means that there is at least one non-null value to be summed. If not, we return null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2009 02:57:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170114#M40656</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-08-29T02:57:21Z</dc:date>
    </item>
    <item>
      <title>SV:Null as Null not zero</title>
      <link>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170115#M40657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you every body for the help. However non of the above mentioned formula seems working for me. I am trying to apply formula on pivot table. Data are being pulled using SQL and SQL has group by clause.&lt;/P&gt;&lt;P&gt;The following formula seems to be working for me at this time. However i really would like to avoid using if else formula in my expression. Is there any other way to avoid zero for nulls while using sum() function ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(count([Value]),Sum([Value] &lt;P&gt;))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2009 03:08:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170115#M40657</guid>
      <dc:creator />
      <dc:date>2009-08-29T03:08:25Z</dc:date>
    </item>
    <item>
      <title>SV:Null as Null not zero</title>
      <link>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170116#M40658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess I just don't understand the problem you're having.&lt;/P&gt;&lt;P&gt;What does your data set look like?&lt;/P&gt;&lt;P&gt;What does your chart look like?&lt;/P&gt;&lt;P&gt;What do you WANT your chart to look like instead?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2009 03:25:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170116#M40658</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-08-29T03:25:35Z</dc:date>
    </item>
    <item>
      <title>Null as Null not zero</title>
      <link>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170117#M40659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also having the same challenge where I would like the sum of a null value to return null and not zero.&lt;/P&gt;&lt;P&gt;I was able to get the following to do the trick:&lt;/P&gt;&lt;P&gt;if(len(value))&amp;gt;0,sum(value)&lt;/P&gt;&lt;P&gt;but now how can I do this same evaluation when using set analysis. Here is the set analysis I am currently using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;({$&amp;lt;SPO_INDICATOR={Equal}&amp;gt;}Value)&lt;/P&gt;&lt;P&gt;But when this expression will return 0 when the Value is null.&lt;/P&gt;&lt;P&gt;How do I add an if statement to set analysis?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Crystal&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 05:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170117#M40659</guid>
      <dc:creator />
      <dc:date>2009-11-10T05:01:52Z</dc:date>
    </item>
    <item>
      <title>Null as Null not zero</title>
      <link>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170118#M40660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background:#cedefd;"&gt;Because the font came out so small, i am reposting what I just sent:&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;I am also having the same challenge where I would like the sum of a null value to return null and not zero.&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;I was able to get the following to do the trick:&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;if(len(value))&amp;gt;0,sum(value)&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;but now how can I do this same evaluation when using set analysis. Here is the set analysis I am currently using:&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;sum&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;({$&amp;lt;SPO_INDICATOR={Equal}&amp;gt;}Value)&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;But when this expression will return 0 when the Value is null.&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;How do I add an if statement to set analysis?&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;Thanks,&lt;/P&gt;&lt;P style="background:#cedefd;"&gt;Crystal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 05:03:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Null-as-Null-not-zero/m-p/170118#M40660</guid>
      <dc:creator />
      <dc:date>2009-11-10T05:03:10Z</dc:date>
    </item>
  </channel>
</rss>

