<?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: Counting securities associated with 3 or less accounts in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014315#M15110</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option would be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;[Position Monthly]:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;[ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;AutoNumber(&lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;[Advisor ID]&amp;amp;'|'&amp;amp;&lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;[Security ID], 'AdvisorSecurityKey') as Key,&lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; [Snapshot Date],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; [Account ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; [Advisor ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; [Security ID]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;FROM [lib://Temp/fragmentation_sample.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;(ooxml, embedded labels, table is [Position Monthly]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Expression:&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sum({&amp;lt;Key = {"=Count(DISTINCT [Account ID] &amp;lt;= 3"}, &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Snapshot Date] = {"$(=Max([Snapshot Date]))"}&lt;/STRONG&gt;&amp;gt;} 1)/&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count({&amp;lt;[Snapshot Date] = {"$(=Max([Snapshot Date]))"}&amp;gt;} Distinct [Security ID])&lt;/STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 May 2016 22:19:11 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-04T22:19:11Z</dc:date>
    <item>
      <title>Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014310#M15105</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 trying to count securities (dimension) that are associated with 3 or less accounts (another dimension). Both IDs appear in my fact table. I need the amount per advisor ID, a third dimension, also in the fact table. The following query actually works but is really slow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr({&amp;lt;[Snapshot Date] = {"$(=max([Snapshot Date]))"}&amp;gt;}if(count(distinct [Account ID]) &amp;lt;= 3, 1, 0),[Security ID], [Advisor ID]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the issue is the double aggregation in my query. Any idea on how I could get the same result a little faster?&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, 22 Dec 2021 15:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014310#M15105</guid>
      <dc:creator>maxim1500</dc:creator>
      <dc:date>2021-12-22T15:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014311#M15106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a small sample? Would be easier to resolve if we can see the issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 16:03:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014311#M15106</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-25T16:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014312#M15107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can barely reproduce the slowness in a small scale sample. I generated a 1M rows random dataset to try to mimic the issue. Mine contains many million rows. At least you will get a better idea of what I am trying to do.&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, 04 May 2016 19:37:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014312#M15107</guid>
      <dc:creator>maxim1500</dc:creator>
      <dc:date>2016-05-04T19:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014313#M15108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about something like this in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Position Monthly]:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Snapshot Date],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Account ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Advisor ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Security ID]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; FROM [lib://Temp/fragmentation_sample.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is [Position Monthly]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AggrTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Security ID],&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Advisor ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Count(DISTINCT &lt;SPAN style="font-size: 13.3333px;"&gt;[Account ID]) &amp;lt;= 3, 1, 0) as Flag&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Resident &lt;SPAN style="font-size: 13.3333px;"&gt;[Position Monthly]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Group By &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;[Security ID], [Advisor ID];&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New Expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum({&amp;lt;[Snapshot Date] = {"$(=Max([Snapshot Date]))"}&amp;gt;} Flag)/Count({&amp;lt;[Snapshot Date] = {"$(=Max([Snapshot Date]))"}&amp;gt;} Distinct [Security ID])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 20:09:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014313#M15108</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-04T20:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014314#M15109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The thing is the accounts can be filtered, so when the filter is applied, the number of fragmented securities will change&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 20:32:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014314#M15109</guid>
      <dc:creator>maxim1500</dc:creator>
      <dc:date>2016-05-04T20:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014315#M15110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option would be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;[Position Monthly]:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;[ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;AutoNumber(&lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;[Advisor ID]&amp;amp;'|'&amp;amp;&lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;[Security ID], 'AdvisorSecurityKey') as Key,&lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; [Snapshot Date],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; [Account ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; [Advisor ID],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; [Security ID]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;FROM [lib://Temp/fragmentation_sample.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;(ooxml, embedded labels, table is [Position Monthly]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Expression:&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sum({&amp;lt;Key = {"=Count(DISTINCT [Account ID] &amp;lt;= 3"}, &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Snapshot Date] = {"$(=Max([Snapshot Date]))"}&lt;/STRONG&gt;&amp;gt;} 1)/&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count({&amp;lt;[Snapshot Date] = {"$(=Max([Snapshot Date]))"}&amp;gt;} Distinct [Security ID])&lt;/STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2016 22:19:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014315#M15110</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-04T22:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014316#M15111</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 tried your solution in my sample app, and I didn't get it to work. Here is the modified sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure I understand the concept neither... If I use an autonumber, I understand that it will create in memory a temporary table with autoincrement keys for each Advisor ID / Security combination. How can these keys match {"=Count(DISTINCT [Account ID] &amp;lt;= 3"}? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks! Really appreciate your support!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 11:41:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014316#M15111</guid>
      <dc:creator>maxim1500</dc:creator>
      <dc:date>2016-05-05T11:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014317#M15112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT {&amp;lt;Key = {"=Count(DISTINCT [Account ID]) &amp;lt;= 3"}, [Snapshot Date] = {"$(=Max([Snapshot Date]))"}&amp;gt;} Key)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/Count({&amp;lt;[Snapshot Date] = {"$(=Max([Snapshot Date]))"}&amp;gt;} Distinct [Security ID])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/123703_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 17:20:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014317#M15112</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-05T17:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014318#M15113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed! Thanks! Would you mind to explain me why this is working? I don't get the key idea...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 11:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014318#M15113</guid>
      <dc:creator>maxim1500</dc:creator>
      <dc:date>2016-05-06T11:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Counting securities associated with 3 or less accounts</title>
      <link>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014319#M15114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a key where we are checking the count of account. To use set analysis in this scenario, we need to use a search string (&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Count(DISTINCT [Account ID]) &amp;lt;= 3&lt;/STRONG&gt;) but this will only work against a unique combination of Security ID and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Advisor &lt;/SPAN&gt;ID (This is based on the fact that you were using the if statement and count of account on these two dimensions in the aggr function. This gave me the idea to combine these to to form a key to use in set analysis). Once combined, I had to play around with it a little to get the matching number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope all the above made sense? I would be interested in knowing if it actually improved performance or if it is almost the same as before?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 20:00:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Counting-securities-associated-with-3-or-less-accounts/m-p/1014319#M15114</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-06T20:00:59Z</dc:date>
    </item>
  </channel>
</rss>

