<?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 How to count with two conditions. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418981#M155860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a database with three columns, the first is call "ID", the second one is call "ID del Incidente Padre" and the third one is call "Area/Subcategoria", i need to obtain the count using the three fields, for example, count the "ID" column if the column "ID del Incidente Padre" is empty, and the column "Area/Subcategoria" contain the word Evento.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry me english.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2012 16:12:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-18T16:12:22Z</dc:date>
    <item>
      <title>How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418981#M155860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a database with three columns, the first is call "ID", the second one is call "ID del Incidente Padre" and the third one is call "Area/Subcategoria", i need to obtain the count using the three fields, for example, count the "ID" column if the column "ID del Incidente Padre" is empty, and the column "Area/Subcategoria" contain the word Evento.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry me english.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 16:12:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418981#M155860</guid>
      <dc:creator />
      <dc:date>2012-09-18T16:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418982#M155861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If(ID = '', if("ID Del Incidente Padre" = '', Count(Area/SubCategoria),Count([ID Del Incidente])),Count(ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If(Count(ID) = 0, if(Count([ID Del Incidente Padre]) = 0, Count(Area/SubCategoria),Count([ID Del Incidente])),Count(ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want distinct count, please add the distinct in your expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 16:21:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418982#M155861</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-09-18T16:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418983#M155862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry but it doesn't work, i tried with something like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if((Area/SubCategoria) = 'Evento', count (if(len([ID Del Incidente Padre])=0, ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it doesn't work too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somebody can help me??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 17:15:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418983#M155862</guid>
      <dc:creator />
      <dc:date>2012-09-18T17:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418984#M155863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; can you provide a sample file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 17:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418984#M155863</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-09-18T17:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418985#M155864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;ID del Incidente Padre&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Area/Subcategoria&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IM345652&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;Incidente&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IM456768&lt;/TD&gt;&lt;TD&gt;IM23456&lt;/TD&gt;&lt;TD&gt;Evento&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IM453636&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;Evento&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IM83738&lt;/TD&gt;&lt;TD&gt;IM56434&lt;/TD&gt;&lt;TD&gt;Incidente&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;IM63536&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;Evento&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the table you can see an example, we have the three columns as i explained, in this case i need to count the elements in 'ID' column, when the column 'ID del Incidente Padre' is empty and the column 'Area/Subcategoria' contain the word 'Evento', as you can see on the example the result must be 2, that correspond to the ID IM453636 and IM63526.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 17:27:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418985#M155864</guid>
      <dc:creator />
      <dc:date>2012-09-18T17:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418986#M155865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you provide me detailed information about the links between the fields "ID Del Incidente Padre",Area/SubCategoria, ID.&lt;/P&gt;&lt;P&gt;and what type of object you are using? and also about dimensions?which is easy to help you out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iyyappan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 17:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418986#M155865</guid>
      <dc:creator>v_iyyappan</dc:creator>
      <dc:date>2012-09-18T17:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418987#M155866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(if(len(trim([ID Del Incidente Padre]))=0 and [Area/SubCategoria]='Evento',1),[ID Del Incidente Padre],Area/SubCategoria))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iyyappan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 17:33:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418987#M155866</guid>
      <dc:creator>v_iyyappan</dc:creator>
      <dc:date>2012-09-18T17:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418988#M155867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Try something like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Count({&amp;lt;[&lt;STRONG style="font-size: 12px;"&gt;Area/Subcategoria&lt;/STRONG&gt;] = {'Evento'},[&lt;STRONG style="font-size: 12px;"&gt;ID del Incidente Padre]&lt;/STRONG&gt;={''}&amp;gt;}Distinct ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Len([&lt;STRONG style="font-size: 12px;"&gt;ID del Incidente Padre]) = 0, &lt;/STRONG&gt;Count({&amp;lt;[&lt;STRONG style="font-size: 12px;"&gt;Area/Subcategoria&lt;/STRONG&gt;] = {'Evento'}&amp;gt;}Distinct ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide the detail as iyyappan asked?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 17:34:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418988#M155867</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-09-18T17:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418989#M155868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attach you can find the example in order that you see the things that i want to obtain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 18:35:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418989#M155868</guid>
      <dc:creator />
      <dc:date>2012-09-18T18:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to count with two conditions.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418990#M155869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 19:19:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-with-two-conditions/m-p/418990#M155869</guid>
      <dc:creator />
      <dc:date>2012-09-18T19:19:16Z</dc:date>
    </item>
  </channel>
</rss>

