<?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 do you perform a Count IF statement over various fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318821#M846977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, hoping someone can help me with working Count If statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to produce a count if expression in a table based on how i know it does work in excel and can not get the answer i need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample data with correct answer in excel :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;client1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;client2&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;accounta&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;accountb&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;accountc&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;=Countif(clienta:clientc,"&amp;gt;0")&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;abc&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;abc&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;234&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;cde&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;cde&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;568&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I am just trying to count each field that has a value in. Regardless of what the value is in the cell it would give that cell a count of 1 then in the new field the count of 1's would be added up so in the above example i have 3 fields i am counting so my new field would never have a count greater than 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Qlik i have tried variations of the following &lt;/P&gt;&lt;P&gt;count(if(accounta='&amp;gt;0' or accountb='&amp;gt;0' or accountc='&amp;gt;0',1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally id like to put this in the load script so that i can produce a new field with the count in but even if i can just put it in an expresssion at the end of my table that would work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>How do you perform a Count IF statement over various fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318821#M846977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, hoping someone can help me with working Count If statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to produce a count if expression in a table based on how i know it does work in excel and can not get the answer i need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample data with correct answer in excel :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;client1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;client2&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;accounta&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;accountb&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;accountc&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;=Countif(clienta:clientc,"&amp;gt;0")&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;abc&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;abc&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;234&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;cde&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;cde&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;568&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I am just trying to count each field that has a value in. Regardless of what the value is in the cell it would give that cell a count of 1 then in the new field the count of 1's would be added up so in the above example i have 3 fields i am counting so my new field would never have a count greater than 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Qlik i have tried variations of the following &lt;/P&gt;&lt;P&gt;count(if(accounta='&amp;gt;0' or accountb='&amp;gt;0' or accountc='&amp;gt;0',1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally id like to put this in the load script so that i can produce a new field with the count in but even if i can just put it in an expresssion at the end of my table that would work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&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/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318821#M846977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you perform a Count IF statement over various fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318822#M846978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(RangeMin(accounta, 1), &lt;SPAN style="font-size: 13.3333px;"&gt;RangeMin(accountb, 1)&lt;/SPAN&gt;, &lt;SPAN style="font-size: 13.3333px;"&gt;RangeMin(accountc, 1)&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 15:09:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318822#M846978</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-31T15:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do you perform a Count IF statement over various fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318823#M846979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for relying but that does not appear to work in my table expression. Or would this work in the script load?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 15:19:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318823#M846979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-31T15:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do you perform a Count IF statement over various fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318824#M846980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad, try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(RangeMin(accounta, 1) + RangeMin(accountb, 1) + RangeMin(accountc, 1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/158512_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 15:27:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318824#M846980</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-31T15:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you perform a Count IF statement over various fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318825#M846981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you soooooo much ive spent days trying to work this out! do you know if i can add it in to the script as a new field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 15:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318825#M846981</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-31T15:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do you perform a Count IF statement over various fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318826#M846982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, this should work in the script also...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RangeMin(accounta, 1) + RangeMin(accountb, 1) + RangeMin(accountc, 1) as NewField&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 16:04:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318826#M846982</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-31T16:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do you perform a Count IF statement over various fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318827#M846983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you so much your help really appreciate it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 16:24:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-perform-a-Count-IF-statement-over-various-fields/m-p/1318827#M846983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-31T16:24:52Z</dc:date>
    </item>
  </channel>
</rss>

