<?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 results of Aggr() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774288#M1049006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Calculated Dimension&lt;/P&gt;&lt;P&gt;=Aggr(COUNT(Framework),Member_Code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;COUNT(DISTINCT Member_Code)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2014 16:03:28 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-11-05T16:03:28Z</dc:date>
    <item>
      <title>Count results of Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774285#M1049003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am quite new to QlikView, could anyone help on task below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got query which returns right figures:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="_jivemacro_uid_14152011710732677 jive_text_macro jive_macro_code" jivemacro_uid="_14152011710732677"&gt;
&lt;P&gt;=Aggr(Count(DISTINCT [Framework Description]),[Customer No_])&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns member name and the number that on frameworks dealing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone tell me how to count in query how many members dealing only in 1 framework, then in 2 and etc? And last one should be 10 or more? Also null value should be excluded here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example of data:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="FrameworkGroupsByMember.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70571_FrameworkGroupsByMember.png" /&gt;&lt;/P&gt;&lt;P&gt;Based on example data above Members dealing in 9 Frameworks should be 11 and on 10 or more Frameworks should be 13. Counts for each framework will be displayed in each separate label.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 15:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774285#M1049003</guid>
      <dc:creator />
      <dc:date>2014-11-05T15:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count results of Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774286#M1049004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Provide some sample data...&lt;/P&gt;&lt;P&gt;You need to use Aggr, Count in Calculated Dimension...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a Straight Table&lt;/P&gt;&lt;P&gt;Calculated Dimension&lt;/P&gt;&lt;P&gt;=Aggr(COUNT(DISTINCT [Framework Description]),[Customer No])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;Count(DISTINCT [Customer No])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 15:44:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774286#M1049004</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-11-05T15:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Count results of Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774287#M1049005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is would be an example of simplified data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SampleData:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14152028918646683" jivemacro_uid="_14152028918646683" modifiedtitle="true"&gt;
&lt;P&gt;Load * inline&lt;/P&gt;
&lt;P&gt;[&lt;/P&gt;
&lt;P&gt;Member_Code, Framework&lt;/P&gt;
&lt;P&gt;A1,FW1&lt;/P&gt;
&lt;P&gt;A1,FW2&lt;/P&gt;
&lt;P&gt;A1,FW3&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A2,FW2&lt;/P&gt;
&lt;P&gt;A2,FW3&lt;/P&gt;
&lt;P&gt;A2,FW4&lt;/P&gt;
&lt;P&gt;A2,FW5&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A3,FW3&lt;/P&gt;
&lt;P&gt;A3,FW3&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A4,FW4&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A5,FW5&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A6,FW5&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;A7,FW1&lt;/P&gt;
&lt;P&gt;A7,FW5&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From this example should return results:&lt;/P&gt;&lt;P&gt;Members dealing on 1 Framework: 3 (Members A4+A5+A6)&lt;/P&gt;&lt;P&gt;Members dealing on 2 Framework: 2 (Members A3+A7)&lt;/P&gt;&lt;P&gt;Members dealing on 3 Framework: 1 (Member A1)&lt;/P&gt;&lt;P&gt;Members dealing on 4 Framework: 1 (Member A2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a query for each line only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 15:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774287#M1049005</guid>
      <dc:creator />
      <dc:date>2014-11-05T15:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count results of Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774288#M1049006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Calculated Dimension&lt;/P&gt;&lt;P&gt;=Aggr(COUNT(Framework),Member_Code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;COUNT(DISTINCT Member_Code)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 16:03:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774288#M1049006</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-11-05T16:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Count results of Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774289#M1049007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You've provided data for table. I need to get just one figure in the label which should look like this for members in a single framework&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1415203735170220" jivemacro_uid="_1415203735170220"&gt;
&lt;P&gt;=Count(&lt;/P&gt;
&lt;P&gt;{$&amp;lt; Aggr(Count(DISTINCT [Framework Description]),[Customer No_]) = {"1"}&amp;nbsp; &amp;gt;}&lt;/P&gt;
&lt;P&gt;Aggr(Count(DISTINCT [Framework Description]),[Customer No_])&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the count of members in 2 frameworks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14152037646654928" jivemacro_uid="_14152037646654928"&gt;
&lt;P&gt;=Count(&lt;/P&gt;
&lt;P&gt;{$&amp;lt; Aggr(Count(DISTINCT [Framework Description]),[Customer No_]) = {"2"}&amp;nbsp; &amp;gt;}&lt;/P&gt;
&lt;P&gt;Aggr(Count(DISTINCT [Framework Description]),[Customer No_])&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately this syntax is not acceptable in Qlik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 16:09:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774289#M1049007</guid>
      <dc:creator />
      <dc:date>2014-11-05T16:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Count results of Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774290#M1049008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=COUNT(Aggr(IF(COUNT(Framework)=1,Member_Code),Member_Code))&lt;/P&gt;&lt;P&gt;=COUNT(Aggr(IF(COUNT(Framework)=2,Member_Code),Member_Code))&lt;/P&gt;&lt;P&gt;=COUNT(Aggr(IF(COUNT(Framework)=3,Member_Code),Member_Code))&lt;/P&gt;&lt;P&gt;=COUNT(Aggr(IF(COUNT(Framework)=4,Member_Code),Member_Code))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 16:19:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774290#M1049008</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-11-05T16:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Count results of Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774291#M1049009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Close but it does not return correct figures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After playing with your suggestion got the right answer:&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14152070450844988" jivemacro_uid="_14152070450844988"&gt;
&lt;P&gt;=Sum(IF(Aggr(Count(DISTINCT [Framework Description]),[Customer No_])&amp;gt;=10, 1))&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 17:00:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774291#M1049009</guid>
      <dc:creator />
      <dc:date>2014-11-05T17:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count results of Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774292#M1049010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't used Distinct, because if I use Distinct, would not able to match your required result as per the data you have provided.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 17:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-results-of-Aggr-function/m-p/774292#M1049010</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-11-05T17:56:36Z</dc:date>
    </item>
  </channel>
</rss>

