<?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: Using COUNT Function to Count if a row has a value from multiple different columns in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-COUNT-Function-to-Count-if-a-row-has-a-value-from-multiple/m-p/2044530#M85948</link>
    <description>&lt;P&gt;Could you try something like this at the row-level:&lt;/P&gt;
&lt;P&gt;aggr(count(Col1)+count(Col2)+count(Col3), Col1, Col2, Col3)&lt;/P&gt;
&lt;P&gt;For the KPI, you could then just wrap this inside a sum(). &lt;BR /&gt;&lt;BR /&gt;(This assumes your blank values are NULLs)&lt;/P&gt;</description>
    <pubDate>Thu, 02 Mar 2023 14:42:22 GMT</pubDate>
    <dc:creator>BenjaminT</dc:creator>
    <dc:date>2023-03-02T14:42:22Z</dc:date>
    <item>
      <title>Using COUNT Function to Count if a row has a value from multiple different columns</title>
      <link>https://community.qlik.com/t5/App-Development/Using-COUNT-Function-to-Count-if-a-row-has-a-value-from-multiple/m-p/2043722#M85910</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Trying to run a COUNT statement to take a running total of any rows that contain a value in two different columns, left an example below&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.4pt;"&gt;
&lt;TD width="64" height="19" style="height: 14.4pt; width: 48pt;"&gt;Col1&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;Col2&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;Col 3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.4pt;"&gt;
&lt;TD height="19" style="height: 14.4pt;"&gt;London&lt;/TD&gt;
&lt;TD&gt;Cup&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.4pt;"&gt;
&lt;TD height="19" style="height: 14.4pt;"&gt;Belfast&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;Cake&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally the total would be 4 and would be used for a KPI chart, I can create the code for one column but not more&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be greatly appreciated&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 11:25:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-COUNT-Function-to-Count-if-a-row-has-a-value-from-multiple/m-p/2043722#M85910</guid>
      <dc:creator>kp2</dc:creator>
      <dc:date>2023-03-01T11:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using COUNT Function to Count if a row has a value from multiple different columns</title>
      <link>https://community.qlik.com/t5/App-Development/Using-COUNT-Function-to-Count-if-a-row-has-a-value-from-multiple/m-p/2044530#M85948</link>
      <description>&lt;P&gt;Could you try something like this at the row-level:&lt;/P&gt;
&lt;P&gt;aggr(count(Col1)+count(Col2)+count(Col3), Col1, Col2, Col3)&lt;/P&gt;
&lt;P&gt;For the KPI, you could then just wrap this inside a sum(). &lt;BR /&gt;&lt;BR /&gt;(This assumes your blank values are NULLs)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 14:42:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-COUNT-Function-to-Count-if-a-row-has-a-value-from-multiple/m-p/2044530#M85948</guid>
      <dc:creator>BenjaminT</dc:creator>
      <dc:date>2023-03-02T14:42:22Z</dc:date>
    </item>
  </channel>
</rss>

