<?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: Count distinct with IF/Filter formula on measure in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-distinct-with-IF-Filter-formula-on-measure/m-p/2034556#M85255</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/216938"&gt;@Tienemientje&lt;/a&gt;&amp;nbsp;,&amp;nbsp;What did you try,&amp;nbsp; and how was it not working as you expected? With a 'certain category', do you mean within a given interval or a certain value?&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2023 16:41:31 GMT</pubDate>
    <dc:creator>E_Røse</dc:creator>
    <dc:date>2023-02-06T16:41:31Z</dc:date>
    <item>
      <title>Count distinct with IF/Filter formula on measure</title>
      <link>https://community.qlik.com/t5/App-Development/Count-distinct-with-IF-Filter-formula-on-measure/m-p/2034466#M85247</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I'm quite new to QS and I have a question on a calculation I want to make.&lt;/P&gt;
&lt;P&gt;I want to count the number of distinct customers that got a value of a certain category.&lt;/P&gt;
&lt;P&gt;Example data in my pivot:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;Person&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Fee&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Other&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;An&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;100&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;An&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;350&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;Ben&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;0&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I want to count:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Fee&lt;/TD&gt;
&lt;TD width="50%"&gt;Other&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;1 (person)&lt;/TD&gt;
&lt;TD width="50%"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you help me identify a good formula for this case?&lt;/P&gt;
&lt;P&gt;PS: I found a couple of similar cases, but either they were to complicated or the provided answer did not work in my case.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 14:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-distinct-with-IF-Filter-formula-on-measure/m-p/2034466#M85247</guid>
      <dc:creator>Tienemientje</dc:creator>
      <dc:date>2023-02-06T14:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct with IF/Filter formula on measure</title>
      <link>https://community.qlik.com/t5/App-Development/Count-distinct-with-IF-Filter-formula-on-measure/m-p/2034556#M85255</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/216938"&gt;@Tienemientje&lt;/a&gt;&amp;nbsp;,&amp;nbsp;What did you try,&amp;nbsp; and how was it not working as you expected? With a 'certain category', do you mean within a given interval or a certain value?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 16:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-distinct-with-IF-Filter-formula-on-measure/m-p/2034556#M85255</guid>
      <dc:creator>E_Røse</dc:creator>
      <dc:date>2023-02-06T16:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct with IF/Filter formula on measure</title>
      <link>https://community.qlik.com/t5/App-Development/Count-distinct-with-IF-Filter-formula-on-measure/m-p/2034611#M85265</link>
      <description>&lt;P&gt;With the category, I mean like in my example "fee" and "other".&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried a number of variations on the following expression&lt;/P&gt;
&lt;P&gt;Count (distinct [Name] and [Fees]&amp;gt;0)&lt;BR /&gt;&lt;BR /&gt;It either gives an error, like if Y try to add the IF statement it says that it needs more parts. (which I can understand, similar to excel, but I found examples online where they did not seem to add the "if not" part).&amp;nbsp; Or it gives a zero or just some high number (either not the distinct values or not only those names for which the fee is above 0)&lt;BR /&gt;&lt;BR /&gt;I now received something from a colleague, but I need to check further if it gives exactly the values I want&lt;/P&gt;
&lt;P&gt;Count(distinct{&amp;lt;[name]={"=sum([fee]&amp;gt;0"}&amp;gt;}[name])&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 18:46:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-distinct-with-IF-Filter-formula-on-measure/m-p/2034611#M85265</guid>
      <dc:creator>Tienemientje</dc:creator>
      <dc:date>2023-02-06T18:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct with IF/Filter formula on measure</title>
      <link>https://community.qlik.com/t5/App-Development/Count-distinct-with-IF-Filter-formula-on-measure/m-p/2034623#M85266</link>
      <description>&lt;P&gt;Will&lt;/P&gt;
&lt;P&gt;count({&amp;lt;Fee={"&amp;gt;0"}&amp;gt;}distinct Person) and&lt;/P&gt;
&lt;P&gt;count({&amp;lt;Other={"&amp;gt;0"}&amp;gt;}distinct Person)&lt;/P&gt;
&lt;P&gt;give you the numbers that you want, or do you somehow need to consider the sums per person? (asking because of your collegue's suggestion)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 19:48:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-distinct-with-IF-Filter-formula-on-measure/m-p/2034623#M85266</guid>
      <dc:creator>E_Røse</dc:creator>
      <dc:date>2023-02-06T19:48:54Z</dc:date>
    </item>
  </channel>
</rss>

