<?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 Objects for Max Date in Set Analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460738#M36063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your Data Load Editor:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Category Code",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Sales Date",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object&lt;/P&gt;&lt;P&gt;FROM [lib://ExcelFilesForTest/Example1.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Hoja1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left Join (Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Category Code",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Max("Sales Date")) as MaxDatePerCategory&lt;/P&gt;&lt;P&gt;FROM [lib://ExcelFilesForTest/Example1.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Hoja1) group by "Category Code";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SalesFinal:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if("Sales Date" = MaxDatePerCategory,1,0) as _flagLastDate&lt;/P&gt;&lt;P&gt;Resident Sales;&lt;/P&gt;&lt;P&gt;drop Table Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use this in your Table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Use Category Code as Dimension, and &lt;/SPAN&gt;count({$&amp;lt;_flagLastDate={1}&amp;gt;} distinct Object)&amp;nbsp; as mease.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jan 2018 22:25:19 GMT</pubDate>
    <dc:creator>hjimenez25</dc:creator>
    <dc:date>2018-01-08T22:25:19Z</dc:date>
    <item>
      <title>Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460735#M36060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &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;I have a table showing Category Code, Sales Date, and Objects:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="TESTA.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/189332_TESTA.JPG" style="height: auto;" /&gt;&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;BR /&gt;&lt;/SPAN&gt;&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;I want to calculate &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;for each Category Code &lt;/SPAN&gt;the quantity of distinct Objects that have the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;max Sales Date &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;for each Category Code&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;IMG alt="TESTB.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/189333_TESTB.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example for the Category Code=1, I want that #Objects=2 because there are 2 distinct Objects that have the Sales Date 18/12/2017.&lt;/P&gt;&lt;P&gt;I'm using the Version November 2017 of Qlik Sense.&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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Any suggestion?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;thx a lot,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Arianna&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/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460735#M36060</guid>
      <dc:creator>anellibridge</dc:creator>
      <dc:date>2021-12-22T15:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460736#M36061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; background: white; font-size: 10.0pt; font-family: 'Helvetica',sans-serif;"&gt;Count(Aggr(Only(Objects), [Sales Date]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 17:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460736#M36061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-08T17:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460737#M36062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Category Code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Measure&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Max([Sale Date])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(If([Sale Date] = Max(TOTAL &amp;lt;[Category Code]&amp;gt; [Sales Date]), 1, 0), [Category Code], [Sale Date]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 19:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460737#M36062</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-08T19:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460738#M36063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your Data Load Editor:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Category Code",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Sales Date",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object&lt;/P&gt;&lt;P&gt;FROM [lib://ExcelFilesForTest/Example1.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Hoja1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left Join (Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Category Code",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(Max("Sales Date")) as MaxDatePerCategory&lt;/P&gt;&lt;P&gt;FROM [lib://ExcelFilesForTest/Example1.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Hoja1) group by "Category Code";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SalesFinal:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if("Sales Date" = MaxDatePerCategory,1,0) as _flagLastDate&lt;/P&gt;&lt;P&gt;Resident Sales;&lt;/P&gt;&lt;P&gt;drop Table Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use this in your Table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Use Category Code as Dimension, and &lt;/SPAN&gt;count({$&amp;lt;_flagLastDate={1}&amp;gt;} distinct Object)&amp;nbsp; as mease.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jan 2018 22:25:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460738#M36063</guid>
      <dc:creator>hjimenez25</dc:creator>
      <dc:date>2018-01-08T22:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460739#M36064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hector,&lt;/P&gt;&lt;P&gt;thank u for your reply, but I can't change the Data Model&amp;nbsp; (it's more complex than this).&lt;/P&gt;&lt;P&gt;I need a formula that allows the dynamic selection of the Dates or something else that change the quantity of Objects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank u so much,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 09:20:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460739#M36064</guid>
      <dc:creator>anellibridge</dc:creator>
      <dc:date>2018-01-09T09:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460740#M36065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Allu,&lt;/P&gt;&lt;P&gt;Thank u for your reply, but unfortunately it doesn't resolve my problem.&lt;/P&gt;&lt;P&gt;I need a formula that calculates &lt;SPAN style="font-size: 13.3333px;"&gt;for each Category Code &lt;/SPAN&gt;how many distinct Objects have the Max Sales Date exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank u so much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 09:51:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460740#M36065</guid>
      <dc:creator>anellibridge</dc:creator>
      <dc:date>2018-01-09T09:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460741#M36066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;thank u so much for your reply!&lt;/P&gt;&lt;P&gt;I tested your formula and it works as I expected. In particular that it's ok if I use it in the first Table, because I obtain 1 in the rows where I have the Max Date.&lt;/P&gt;&lt;P&gt;My problem is calculate the count of this 1 in the second Table.&lt;/P&gt;&lt;P&gt;Could you give me another suggestion for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank u a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 10:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460741#M36066</guid>
      <dc:creator>anellibridge</dc:creator>
      <dc:date>2018-01-09T10:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460742#M36067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not entirely sure what you mean? Isn't the 2nd table the expected output of what you are looking to get?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 12:06:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460742#M36067</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-01-09T12:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460743#M36068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes!&lt;/P&gt;&lt;P&gt;I modified your formula and It seems to work &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. &lt;SPAN style="font-size: 13.3333px;"&gt;Now I'm doing some test with this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(TOTAL &amp;lt;&lt;STRONG&gt;[Category Code]&lt;/STRONG&gt;&amp;gt; if([&lt;STRONG&gt;Sales Date]&lt;/STRONG&gt; = Aggr(max(TOTAL &amp;lt;&lt;STRONG&gt;[Category Code]&lt;/STRONG&gt;&amp;gt; &lt;STRONG&gt;[Sales Date]&lt;/STRONG&gt;), &lt;STRONG&gt;[Category Code]&lt;/STRONG&gt;, [Object]), 1, 0))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 13:28:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460743#M36068</guid>
      <dc:creator>anellibridge</dc:creator>
      <dc:date>2018-01-09T13:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460744#M36069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arianna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know you can not modify your data model, it could be better. This is a modified version of Sunny´s solution and yours:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this: &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum(TOTAL &amp;lt;[Category Code]&amp;gt; aggr(if([Sales Date] = max(TOTAL &amp;lt;[Category Code]&amp;gt; [Sales Date]), 1, 0),[Category Code], [Sales Date],[Object]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 15:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460744#M36069</guid>
      <dc:creator>hjimenez25</dc:creator>
      <dc:date>2018-01-09T15:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460745#M36070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arianna&lt;/P&gt;&lt;P&gt;Try this: FirstSortedValue(aggr(Count( distinct Objects),[Sales Date] ), -[Sales Date] )&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;I hope this helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 10:52:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460745#M36070</guid>
      <dc:creator>justinphamvn</dc:creator>
      <dc:date>2018-01-10T10:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count Objects for Max Date in Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460746#M36071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hector,&lt;/P&gt;&lt;P&gt;thank u a lot for your reply, but it doesn't function that formula.&lt;/P&gt;&lt;P&gt;After a lot of test I found the solution! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count( Distinct If(Aggr(NODISTINCT Max( TOTAL &amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Category Code]&lt;/SPAN&gt;&amp;gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Sales Date]&lt;/SPAN&gt;),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Category Code]&lt;/SPAN&gt;,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Object]&lt;/SPAN&gt;) = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Sales Date]&lt;/SPAN&gt;, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Object]&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot to everyone,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 11:34:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Objects-for-Max-Date-in-Set-Analysis/m-p/1460746#M36071</guid>
      <dc:creator>anellibridge</dc:creator>
      <dc:date>2018-01-11T11:34:43Z</dc:date>
    </item>
  </channel>
</rss>

