<?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 First Sorted Valued, Max &amp; Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/First-Sorted-Valued-Max-Set-Analysis/m-p/69114#M767091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm new to Qlik.&amp;nbsp; I want to resolve the following problem in the Presentation Layer using SetAnalysis and Expression (I can't use scripting).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUNT&lt;/P&gt;&lt;P&gt;AA&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;BB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;CC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;AA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to extract the ID with the MAX(SUM(COUNT) grouped by ID) value.&lt;/P&gt;&lt;P&gt;In the above example I want to show both AA and CC values (4).&lt;/P&gt;&lt;P&gt;I thinked the following expression: =FirstSortedValue(ID,-Aggr(Sum([COUNT]),ID),1) but when there are more than one ID with the same MAX(SUM(COUNT) grouped by ID value, FirstSortedValue return NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I write an expression with the same above purpose ?&lt;/P&gt;&lt;P&gt;I thinked to use Set Analysis combined with Concatenate and Max functions, but I can't figured how approaches the solution.&lt;/P&gt;&lt;P&gt;Thanks you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>dvugopietro</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>First Sorted Valued, Max &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Valued-Max-Set-Analysis/m-p/69114#M767091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm new to Qlik.&amp;nbsp; I want to resolve the following problem in the Presentation Layer using SetAnalysis and Expression (I can't use scripting).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUNT&lt;/P&gt;&lt;P&gt;AA&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;BB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;CC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;AA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to extract the ID with the MAX(SUM(COUNT) grouped by ID) value.&lt;/P&gt;&lt;P&gt;In the above example I want to show both AA and CC values (4).&lt;/P&gt;&lt;P&gt;I thinked the following expression: =FirstSortedValue(ID,-Aggr(Sum([COUNT]),ID),1) but when there are more than one ID with the same MAX(SUM(COUNT) grouped by ID value, FirstSortedValue return NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I write an expression with the same above purpose ?&lt;/P&gt;&lt;P&gt;I thinked to use Set Analysis combined with Concatenate and Max functions, but I can't figured how approaches the solution.&lt;/P&gt;&lt;P&gt;Thanks you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Valued-Max-Set-Analysis/m-p/69114#M767091</guid>
      <dc:creator>dvugopietro</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: First Sorted Valued, Max &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Valued-Max-Set-Analysis/m-p/69115#M767092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be use this instead&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concat(Aggr(If(Sum(COUNT) = Max(TOTAL Aggr(Sum(COUNT), ID)), ID), ID), ', ')&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 16:12:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Valued-Max-Set-Analysis/m-p/69115#M767092</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-22T16:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: First Sorted Valued, Max &amp; Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/First-Sorted-Valued-Max-Set-Analysis/m-p/69116#M767093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny.&lt;/P&gt;&lt;P&gt;Thanks you. The result is correct.&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 17:43:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/First-Sorted-Valued-Max-Set-Analysis/m-p/69116#M767093</guid>
      <dc:creator>dvugopietro</dc:creator>
      <dc:date>2018-06-22T17:43:24Z</dc:date>
    </item>
  </channel>
</rss>

