<?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: Counting number of rows with multiple conditions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40257#M777470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the back-end or UI?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 May 2018 05:30:39 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2018-05-02T05:30:39Z</dc:date>
    <item>
      <title>Counting number of rows with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40256#M777469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikview Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data model was pasted in below:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/201215_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;How can I count the correct number of rows if my 'Type' field is = DST or CST and my 'Step1 - Step4' fields doesn't contain any numbers?&lt;/P&gt;&lt;P&gt;So my desired outcome would be 3 rows?&lt;/P&gt;&lt;P&gt;Thank you for your time in advance! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&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>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40256#M777469</guid>
      <dc:creator>s10157754</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Counting number of rows with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40257#M777470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At the back-end or UI?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 05:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40257#M777470</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-05-02T05:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Counting number of rows with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40258#M777471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Tresesco B,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was at UI.&lt;/P&gt;&lt;P&gt;My current expression looks like this (Where ProductNumber, Date &amp;amp; Time are my other fields):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Rangesum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Step1&lt;/SPAN&gt;)=0,1),&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Step2&lt;/SPAN&gt;)=0,1),&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Step3&lt;/SPAN&gt;)=0,1),&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Step4&lt;/SPAN&gt;)=0,1),&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Type&lt;/SPAN&gt;='DST',1))=5,1),ProductNumber,Date,Time&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, I was facing problems in adding 'or' into my 'Type' field. Is there any suggestions?&lt;/SPAN&gt; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&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>Wed, 02 May 2018 06:06:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40258#M777471</guid>
      <dc:creator>s10157754</dc:creator>
      <dc:date>2018-05-02T06:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Counting number of rows with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40259#M777472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the back end&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Count({&amp;lt;Type = {'CST', 'DST'}&amp;gt;} If(Len(Step1) or Len(Step2) or Len(Step3) or Len(Step4), Null(), Type))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But a better approach is to create a flag field in the load script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;If(Len(Step1) or Len(Step2) or Len(Step3) or Len(Step4), 0, 1) as FlagEmpty,&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;And then use expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;=Count({&amp;lt;Type = {'CST', 'DST'}, FlagEmpty = {0}&amp;gt;} Type)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 06:06:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40259#M777472</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-05-02T06:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Counting number of rows with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40260#M777473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If ProductNumber is an identifying* field for the table, then a pure set analysis expression could be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Count({&amp;lt;Type = {'CST', 'DST'}, ProductNumber = {"$(=(Len(Step1) or Len(Step2) or Len(Step3) or Len(Step4)) = 0)"} Step)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;* a field whose values uniquely identify a row in the table, like a primary key or unique index in SQL.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 06:11:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40260#M777473</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-05-02T06:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Counting number of rows with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40261#M777474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;You can create a &lt;/SPAN&gt;straight chart at UI and set Type as Dimension and below as expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Or in a &lt;/SPAN&gt;text box&lt;SPAN style="font-size: 10pt;"&gt; as you required, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum(if( (Type ='&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DST&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;' or Type=C&lt;SPAN&gt;ST&lt;/SPAN&gt;') and len(trim(&lt;SPAN&gt;Step4))=0 and l&lt;SPAN&gt;en(trim(&lt;/SPAN&gt;&lt;SPAN&gt;Step3))=0,1,0))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;BR,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN&gt;&lt;SPAN&gt;KC&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 06:12:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40261#M777474</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2018-05-02T06:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Counting number of rows with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40262#M777475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for the help! Your expression is better than my original one! Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;QianNing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 06:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/40262#M777475</guid>
      <dc:creator>s10157754</dc:creator>
      <dc:date>2018-05-02T06:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Counting number of rows with multiple conditions</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/1607190#M777476</link>
      <description>&lt;P&gt;I am trying to count with two conditions and getting results based only on the first condition.&lt;/P&gt;&lt;P&gt;=&lt;STRONG&gt;Count( DISTINCT {&amp;lt;A-={"DC"}&amp;gt;} {&amp;lt;B-={"KC"}&amp;gt;} A&amp;amp;'|'&amp;amp;B)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can you help with this?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I want OR operator between the two conditions.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 19:40:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-number-of-rows-with-multiple-conditions/m-p/1607190#M777476</guid>
      <dc:creator>abhi1693r</dc:creator>
      <dc:date>2019-07-29T19:40:30Z</dc:date>
    </item>
  </channel>
</rss>

