<?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: Finding the group with max value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886614#M309091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect Rubin! The easy option is really elegant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And your solution for tackling more than 1 possible groups/dates works like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, I tried to make my question as simple to understand as possible, and the sample qvw file was to make my helper's life easy in answering according to what i am searching for &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Thanks again Rubin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jul 2015 13:09:13 GMT</pubDate>
    <dc:creator>perla_chirag</dc:creator>
    <dc:date>2015-07-06T13:09:13Z</dc:date>
    <item>
      <title>Finding the group with max value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886610#M309087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached Sample data (QVW and Excel file).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 4 columns (ID, Group, Value, Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The overall Max from the Value data points i get from a simple Max(Value) expression in&amp;nbsp; a text object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I need to find the Group which corresponds to this Max Value, and similarly the Date on which the Max Value occurred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The QVW that I have provided is loaded with the sample data, and I have created text objects where you'll can show me the expression to use to get the Group with Max value and Date with Max value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 12:31:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886610#M309087</guid>
      <dc:creator>perla_chirag</dc:creator>
      <dc:date>2015-07-06T12:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the group with max value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886611#M309088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a look at the attachment &lt;/P&gt;&lt;P&gt;you can use firstsortedvalue function&lt;/P&gt;&lt;P&gt;no need to do anything in the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 12:35:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886611#M309088</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-07-06T12:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the group with max value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886612#M309089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chirag, one easy option:&lt;/P&gt;&lt;P&gt;for group: =FirstSortedValue(Group, -Value)&lt;/P&gt;&lt;P&gt;for date: =FirstSortedValue(Date, -Value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it can fail if for the max value there are more than one group and/or date. What has to show when there is a tie in max value? something like?:&lt;/P&gt;&lt;P&gt;for group: =Concat(DISTINCT {&amp;lt;Value={'$(=Max(Value))'}&amp;gt;} Group, ', ')&lt;/P&gt;&lt;P&gt;for date: =Concat(DISTINCT {&amp;lt;Value={'$(=Max(Value))'}&amp;gt;} Date, ', ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, very good format of your post: well explained and guided samples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 12:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886612#M309089</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-07-06T12:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the group with max value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886613#M309090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks It works! Just needed to make a small change in the expression for Date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"=FirstSortedValue(Date,-aggr(max(Value),Group))"&lt;/P&gt;&lt;P&gt;changed to&lt;/P&gt;&lt;P&gt;"=FirstSortedValue(Date,-aggr(max(Value),Date))"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help on this Liron &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 13:03:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886613#M309090</guid>
      <dc:creator>perla_chirag</dc:creator>
      <dc:date>2015-07-06T13:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the group with max value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886614#M309091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect Rubin! The easy option is really elegant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And your solution for tackling more than 1 possible groups/dates works like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, I tried to make my question as simple to understand as possible, and the sample qvw file was to make my helper's life easy in answering according to what i am searching for &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Thanks again Rubin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 13:09:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886614#M309091</guid>
      <dc:creator>perla_chirag</dc:creator>
      <dc:date>2015-07-06T13:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the group with max value</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886615#M309092</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 attached u r&amp;nbsp; QVW with solution u can see that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 13:18:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-the-group-with-max-value/m-p/886615#M309092</guid>
      <dc:creator />
      <dc:date>2015-07-06T13:18:02Z</dc:date>
    </item>
  </channel>
</rss>

