<?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: Countifs with column value match in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886747#M73052</link>
    <description>&lt;P&gt;Hi, you can try with: Count(Distinct TOTAL &amp;lt;Column_3&amp;gt; Column_1)&lt;/P&gt;
&lt;P&gt;TOTAL tells to ignore dimensions, and the field between &amp;lt;&amp;gt; is the field(s) to not ignore&lt;/P&gt;</description>
    <pubDate>Sat, 29 Jan 2022 08:32:12 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2022-01-29T08:32:12Z</dc:date>
    <item>
      <title>Countifs with column value match</title>
      <link>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886549#M73036</link>
      <description>&lt;P&gt;Hello there!&lt;/P&gt;
&lt;P&gt;Here in the community I managed to find a replacement for countifs from google spreadsheets for qlik. But I couldn't figure out how to use this not for a specific value, but for a column.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What I need:&lt;/STRONG&gt; count(distinct Column_1 where value for Column_3 is like in this row).&lt;/P&gt;
&lt;P&gt;That is, if we look at the table below, I want each row in the &lt;EM&gt;Column_count&lt;/EM&gt; column to have the number of unique values from &lt;EM&gt;Column_1&lt;/EM&gt; for which &lt;EM&gt;Column_3&lt;/EM&gt; = banana (for row 1); apple (for row 2) and so on.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-&amp;gt;&amp;nbsp;If I have 12 stores that sell bananas, I want to see 12 in row 1, and if I have 20 stores that sell apples, I want to see 20 in row 2&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;Column_1&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;Column_2&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;Column_3&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;Column_count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;store_1&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;pa ra pa pa pam&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;banana&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%" height="25px"&gt;store_2&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;pa ra pa pa pam&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;apple&lt;/TD&gt;
&lt;TD width="25%" height="25px"&gt;20&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a simplified example, in fact I need to list 2 or 3 columns in the filter.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 13:58:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886549#M73036</guid>
      <dc:creator>ZimaBlue</dc:creator>
      <dc:date>2022-01-28T13:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Countifs with column value match</title>
      <link>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886747#M73052</link>
      <description>&lt;P&gt;Hi, you can try with: Count(Distinct TOTAL &amp;lt;Column_3&amp;gt; Column_1)&lt;/P&gt;
&lt;P&gt;TOTAL tells to ignore dimensions, and the field between &amp;lt;&amp;gt; is the field(s) to not ignore&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 08:32:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886747#M73052</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-01-29T08:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Countifs with column value match</title>
      <link>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886760#M73053</link>
      <description>&lt;P&gt;Hello! Thank you for your reply!&lt;/P&gt;
&lt;P&gt;It seems that total is intended only for visualization, not for the script editor &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; since I get an error when loading data. And by syntax highlighting, I also see that the script does not recognize TOTAL as a command.&lt;/P&gt;
&lt;P&gt;Is there a way to write this in a data loading script?&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 12:34:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886760#M73053</guid>
      <dc:creator>ZimaBlue</dc:creator>
      <dc:date>2022-01-29T12:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Countifs with column value match</title>
      <link>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886761#M73054</link>
      <description>&lt;P&gt;However, I tested it for visualization and it works brilliantly - thank you for the help!&lt;/P&gt;
&lt;P&gt;I would still like to know if it can be used right inside the script.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 12:53:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886761#M73054</guid>
      <dc:creator>ZimaBlue</dc:creator>
      <dc:date>2022-01-29T12:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Countifs with column value match</title>
      <link>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886790#M73057</link>
      <description>&lt;P&gt;Hi, TOTAL is used to ignore dimensions in chart, and in script there are no charts. A similar utility would be the 'group by'&lt;/P&gt;
&lt;P&gt;In example if you have a 'Data' table with columns 1, 2 and 3, you can add the new colum in the next step with just:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Left Join(Data)
Load Column_3,
  Count(Distinct Column_1) as Column_Count
Resident Data
Group by Column_3;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 18:25:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886790#M73057</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-01-29T18:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Countifs with column value match</title>
      <link>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886805#M73061</link>
      <description>&lt;P&gt;I understand that now. It turned out to be easier, I made it too complicated.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks again for your help!&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jan 2022 01:26:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Countifs-with-column-value-match/m-p/1886805#M73061</guid>
      <dc:creator>ZimaBlue</dc:creator>
      <dc:date>2022-01-30T01:26:16Z</dc:date>
    </item>
  </channel>
</rss>

