<?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 Count function with non-NULL  and non-ZERO in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302080#M1199027</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I forgot to mention that if you are using the revenue as an expression, similar to these:&lt;/P&gt;&lt;P&gt;sum(revenue)&lt;/P&gt;&lt;P&gt;You might try using as sum(aggr) type expression to count the values:&lt;/P&gt;&lt;P&gt;sum(aggr(if(sum(revenue) &amp;gt;0,1,0) ,Customer))&lt;/P&gt;&lt;P&gt;You can also use this notation to get rid of the if:&lt;/P&gt;&lt;P&gt;sum(aggr( (sum(revenue) &amp;gt; 0) * -1 ,Customer))&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jan 2011 16:59:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-26T16:59:39Z</dc:date>
    <item>
      <title>Count function with non-NULL  and non-ZERO</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302076#M1199023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have 5 SALESGROUPS each with a large number of CLIENTS.&lt;/P&gt;&lt;P&gt;In the raw data some of the CLIENT'S REVENUE is either a&lt;/P&gt;&lt;P&gt;1. positive/negativer number&lt;BR /&gt;2. or hardcoded zero&lt;BR /&gt;3. blank.&lt;/P&gt;&lt;P&gt;I created a Straight Table with the SALESGROUP as the dimension and wanted only to COUNT THE NON-ZERO/NON-NULL CLIENTS.&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;=if (revenue&amp;lt;&amp;gt;0 or revenue &amp;lt;&amp;gt; NULL(),count(distinct CLIENTS)) and some variants but not working.&lt;/P&gt;&lt;P&gt;Can anybody advise? Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 15:42:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302076#M1199023</guid>
      <dc:creator />
      <dc:date>2011-01-26T15:42:51Z</dc:date>
    </item>
    <item>
      <title>Count function with non-NULL  and non-ZERO</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302077#M1199024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nulls can sometimes be difficult to work with. I would try to replace those values in the load script with either a 0 or -, if you need to tell the difference between 0 and blank. You should also try using Set Analysis. This may work:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;REMOVED&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;That should get rid of the nulls and zero values. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;EDIT: The expression pasted incorrectly. It has been removed. See below...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 16:30:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302077#M1199024</guid>
      <dc:creator />
      <dc:date>2011-01-26T16:30:47Z</dc:date>
    </item>
    <item>
      <title>Count function with non-NULL  and non-ZERO</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302078#M1199025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I tried that expression but the expression comes up as an error (expression is default black font after the single quote).&lt;/P&gt;&lt;P&gt;I've never seen this type of expression before and am hoping there is some syntatical adjustment needed as I've no experience with the 0' type syntax.&lt;/P&gt;&lt;P&gt;Otherwise, I'm going to try to make a script adjustment like you suggested. Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 16:40:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302078#M1199025</guid>
      <dc:creator />
      <dc:date>2011-01-26T16:40:16Z</dc:date>
    </item>
    <item>
      <title>Count function with non-NULL  and non-ZERO</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302079#M1199026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, try this:&lt;/P&gt;&lt;P&gt;count($&amp;lt;revenue = {"*"} - {0}&amp;gt;distinct CLIENTS )&lt;/P&gt;&lt;P&gt;It is not tested but thats the main idea. The star ({"*"}) should get rid of null values, while (-{0}) should take the zero values out of the equation.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 16:49:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302079#M1199026</guid>
      <dc:creator />
      <dc:date>2011-01-26T16:49:51Z</dc:date>
    </item>
    <item>
      <title>Count function with non-NULL  and non-ZERO</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302080#M1199027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I forgot to mention that if you are using the revenue as an expression, similar to these:&lt;/P&gt;&lt;P&gt;sum(revenue)&lt;/P&gt;&lt;P&gt;You might try using as sum(aggr) type expression to count the values:&lt;/P&gt;&lt;P&gt;sum(aggr(if(sum(revenue) &amp;gt;0,1,0) ,Customer))&lt;/P&gt;&lt;P&gt;You can also use this notation to get rid of the if:&lt;/P&gt;&lt;P&gt;sum(aggr( (sum(revenue) &amp;gt; 0) * -1 ,Customer))&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 16:59:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302080#M1199027</guid>
      <dc:creator />
      <dc:date>2011-01-26T16:59:39Z</dc:date>
    </item>
    <item>
      <title>Count function with non-NULL  and non-ZERO</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302081#M1199028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, sorry, I was having some issues with the site earlier. That is not the expression I pasted in. The Edit option wasn't working and I kind of forgot about it.&lt;/P&gt;&lt;P&gt;The expression I was trying to post was:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Count({&amp;lt;revenue={'&amp;gt;0'}&amp;gt;+&amp;lt;revenue={'&amp;lt;0'}&amp;gt;} distinct CLIENTS)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;That should give the list of all CLIENTS with a revenue greater than 0 or less than 0, which should exclude nulls and zeros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jan 2011 22:42:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-with-non-NULL-and-non-ZERO/m-p/302081#M1199028</guid>
      <dc:creator />
      <dc:date>2011-01-26T22:42:18Z</dc:date>
    </item>
  </channel>
</rss>

