<?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: count with a condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604089#M477168</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;condition on expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(distinct if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[QUOTA PARTECIPAZIONE DIRETTA]&lt;/SPAN&gt;&amp;gt;0,&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; [CODICE ISTAT ENTE PARTECIPANTE]&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;remove single quote&lt;/P&gt;&lt;P&gt;remove decimal or if you want it, I suppose you have to use .&amp;nbsp; not&amp;nbsp; , (comma)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 May 2014 19:19:33 GMT</pubDate>
    <dc:creator>maxgro</dc:creator>
    <dc:date>2014-05-06T19:19:33Z</dc:date>
    <item>
      <title>count with a condition</title>
      <link>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604086#M477165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;in the "expression" tab of a pivot table, I'd like to make a count only if a condition is true, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CONDITION&lt;/STRONG&gt;: [QUOTA PARTECIPAZIONE DIRETTA]&amp;gt;'0,0' and [QUOTA PARTECIPAZIONE DIRETTA]&amp;lt;='0,1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EXPRESSION&lt;/STRONG&gt;: count(DISTINCT [CODICE ISTAT ENTE PARTECIPANTE])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where I go wrong?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Lorenzo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 15:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604086#M477165</guid>
      <dc:creator />
      <dc:date>2014-05-06T15:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: count with a condition</title>
      <link>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604087#M477166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add a field into your table:&lt;/P&gt;&lt;P&gt;1 as RowCount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use set analysis:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[QUOTA PARTECIPAZIONE DIRETTA]={"&amp;gt;0"}&amp;gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowCount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 15:46:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604087#M477166</guid>
      <dc:creator>richard_pearce6</dc:creator>
      <dc:date>2014-05-06T15:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: count with a condition</title>
      <link>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604088#M477167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Please check out the attached file. Its a slight variation to Richard's solution. I am using an If condition on the back-end to determine if its &amp;gt;0 (a Flag) so that on the front end you can just do Sum(Flag).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 16:12:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604088#M477167</guid>
      <dc:creator />
      <dc:date>2014-05-06T16:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: count with a condition</title>
      <link>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604089#M477168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;condition on expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(distinct if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[QUOTA PARTECIPAZIONE DIRETTA]&lt;/SPAN&gt;&amp;gt;0,&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; [CODICE ISTAT ENTE PARTECIPANTE]&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;remove single quote&lt;/P&gt;&lt;P&gt;remove decimal or if you want it, I suppose you have to use .&amp;nbsp; not&amp;nbsp; , (comma)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 19:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604089#M477168</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-06T19:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: count with a condition</title>
      <link>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604090#M477169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In Load script add a flag like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;If([QUOTA PARTECIPAZIONE DIRETTA] &amp;lt;= 0 ,1) as QPD_Flag&lt;/P&gt;&lt;P&gt;From Location;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then in expression use expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(QPD_Flag)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 20:44:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604090#M477169</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-05-06T20:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: count with a condition</title>
      <link>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604091#M477170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to all for your support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 08:30:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-with-a-condition/m-p/604091#M477170</guid>
      <dc:creator />
      <dc:date>2014-05-09T08:30:14Z</dc:date>
    </item>
  </channel>
</rss>

