<?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: FirstSortedValue()_Multiple dimension values with same count in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092951#M927060</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to answer this with my first answer to your thread, if you want to see both employees, you need to use Concat().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Mar 2016 20:54:07 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-03-29T20:54:07Z</dc:date>
    <item>
      <title>FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092946#M927055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;Following is the schema of my data.&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 528px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="98"&gt;EmployeeID&lt;/TD&gt;&lt;TD class="xl63" width="47"&gt;Age&lt;/TD&gt;&lt;TD class="xl63" width="106"&gt;Consumption&lt;/TD&gt;&lt;TD class="xl63" width="98"&gt;Education&lt;/TD&gt;&lt;TD class="xl63" width="70"&gt;Gender&lt;/TD&gt;&lt;TD class="xl63" width="109"&gt;YearlyIncome&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show &lt;STRONG&gt;EmployeeID, Age, Gender &lt;/STRONG&gt;in different text objects who have highest YearlyIncome. Previously I have data (&lt;STRONG&gt;Sheet 1&lt;/STRONG&gt;) where there was only one Max value. I solved this problem by using FirstSortedValue() function. But in the current data (&lt;STRONG&gt;Sheet 2&lt;/STRONG&gt;) I've two EmployeeID which are sharing the same maximum YearlyIncome. Please find the attached data set and qvw application. I solved this issue by following two approaches. Here are they-&lt;/P&gt;&lt;P&gt;Approach1: Concat(If(Aggr(Sum(YearlyIncome),EmployeeID)=vMaxSal,EmployeeID),',')&lt;/P&gt;&lt;P&gt;Approach2: Concat( {1&amp;lt;EmployeeID=P({&amp;lt;YearlyIncome={$(vMaxSal)}&amp;gt;})&amp;gt;} EmployeeID,',')&lt;/P&gt;&lt;P&gt;vMaxSal: =Max(Aggr(Sum(YearlyIncome),EmployeeID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I've already solved the problem but still I've the following questions:&lt;/P&gt;&lt;P&gt;1) Can this problem be solved by using FirstSortedValue() in &lt;STRONG&gt;UI&lt;/STRONG&gt; ? If Yes then how, if not then why No?&lt;/P&gt;&lt;P&gt;2) Can this problem be solved by using FirstSortedValue() in &lt;STRONG&gt;script&lt;/STRONG&gt; ? If Yes then how, if not then why No?&lt;/P&gt;&lt;P&gt;3) Which approach is most effective way for huge amount of data, &lt;STRONG&gt;Approach 1&lt;/STRONG&gt; or &lt;STRONG&gt;Approach 2&lt;/STRONG&gt; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the app and data set and also I'm attaching script in notepad. Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy&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/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092946#M927055</guid>
      <dc:creator>joydipp1988</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same count</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092947#M927056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the DISTINCT qualifier with FirstSortedValue() to get at least one result back, the first employee in load order.&lt;/P&gt;&lt;P&gt;If you want both, you need to use the Concat() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 19:13:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092947#M927056</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-29T19:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same count</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092948#M927057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your quick reply. But I actually wanted to get both result. I tried FirstSortedValue() with Concat(). But couldn't make it. Can you please guide me how to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 19:22:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092948#M927057</guid>
      <dc:creator>joydipp1988</dc:creator>
      <dc:date>2016-03-29T19:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same count</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092949#M927058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I understand, I thought you already got it working with your two approaches?&lt;/P&gt;&lt;P&gt;How do you want to get FirstSortedValue() into one of these approaches?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 19:46:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092949#M927058</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-29T19:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same count</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092950#M927059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you misunderstood. Actually I got my result with my two approaches. I don't want to merge FirstSortedValue() with my two approaches. I just wanted to know is it possible to get the same result by using FirstSortedValue() or not ? If possible then how ? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 20:07:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092950#M927059</guid>
      <dc:creator>joydipp1988</dc:creator>
      <dc:date>2016-03-29T20:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same count</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092951#M927060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to answer this with my first answer to your thread, if you want to see both employees, you need to use Concat().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 20:54:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092951#M927060</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-29T20:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same count</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092952#M927061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yaa I got your reply. Actually I was looking for a proper expression which use FirstSortedValue() function with Concat() function all will work for me. For this reason only I attached my qvw app. Anyway, thanks for your concern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2016 20:59:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092952#M927061</guid>
      <dc:creator>joydipp1988</dc:creator>
      <dc:date>2016-03-29T20:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same count</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092953#M927062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=FirstSortedValue( Aggr(Concat(DISTINCT EmployeeID, ','),YearlyIncome),-Aggr(YearlyIncome,YearlyIncome))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 11:41:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092953#M927062</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-03-30T11:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same count</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092954#M927063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, but I can spot the Concat() function in there &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 11:42:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092954#M927063</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-30T11:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092955#M927064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sure that this is something that you too wanted to communicate. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I guess, it could be a communication-gap. I read:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Actually I was looking for a proper expression which use FirstSortedValue() function with Concat() function all will work for me. &lt;/SPAN&gt;&lt;/P&gt;



&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and thought that let's check if this is what he wants.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 11:47:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092955#M927064</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-03-30T11:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092956#M927065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may be right. I haven't really understood what the OP is after.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 11:54:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092956#M927065</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-30T11:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092957#M927066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Sir,&lt;/P&gt;&lt;P&gt;Thanks for the quick reply. The expression you suggest is actually what I wanted. I got the output. But I'm not getting its flow of execution. &lt;/P&gt;&lt;P&gt;First part of the expression I understood i.e. &lt;STRONG&gt;Aggr(Concat(DISTINCT EmployeeID, ','),YearlyIncome)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But next part i.e. sort weight part &lt;STRONG&gt;-Aggr(YearlyIncome,YearlyIncome)&lt;/STRONG&gt; I'm not getting. Why you did that? Please explain the flow. Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 12:24:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092957#M927066</guid>
      <dc:creator>joydipp1988</dc:creator>
      <dc:date>2016-03-30T12:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092958#M927067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-Aggr(YearlyIncome,YearlyIncome) - &lt;/STRONG&gt;is to tell qv &lt;EM&gt;explicitly&lt;/EM&gt; that consider the aggregation level at &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;YearlyIncome &lt;/STRONG&gt;. Note,&lt;EM&gt; this &lt;STRONG&gt;aggr()&lt;/STRONG&gt; is only required when there are multiple occurrences of the same dimension values with maximum ranked values calculated.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;That means, had there not been multiple &lt;EM&gt;EmployeeIDs &lt;/EM&gt;,&lt;/P&gt;&lt;P&gt;the epression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;=FirstSortedValue( Aggr(Concat(DISTINCT EmployeeID, ','),YearlyIncome),&lt;STRONG style="color: #3366ff;"&gt;-YearlyIncome&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;would work fine. Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 13:00:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092958#M927067</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-03-30T13:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092959#M927068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;A href="https://community.qlik.com/qlik-users/26418"&gt;tresesco&lt;/A&gt;‌ and &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Thanks for your sincere reply. I got my desired answer from your replies. But I've one last query on this topic. Till now we have got three exact solutions of this problem. They are as follows-&lt;/P&gt;&lt;P&gt;1) =Concat(If(Aggr(Sum(YearlyIncome),EmployeeID)=vMaxSal,EmployeeID),',')&lt;/P&gt;&lt;P&gt;2) =Concat( {1&amp;lt;EmployeeID=P({&amp;lt;YearlyIncome={$(vMaxSal)}&amp;gt;})&amp;gt;} EmployeeID,',')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vMaxSal: =Max(Aggr(Sum(YearlyIncome),EmployeeID))&lt;/P&gt;&lt;P&gt;3) &lt;SPAN style="font-family: 'courier new', courier;"&gt;=FirstSortedValue( Aggr(Concat(DISTINCT EmployeeID, ','),YearlyIncome),-Aggr(YearlyIncome,YearlyIncome))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So my question is which one is the best solution for huge (millions) of data and why? Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Apr 2016 14:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092959#M927068</guid>
      <dc:creator>joydipp1988</dc:creator>
      <dc:date>2016-04-02T14:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same count</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092960#M927069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SWuhl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to accomplish the same result in the script? As AGGR is not a script function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to create a separate table in order to achieve the results I need, and they include top results based on Vendor and Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2017 19:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/1092960#M927069</guid>
      <dc:creator>luizcdepaula</dc:creator>
      <dc:date>2017-01-31T19:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2146315#M1225015</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;could you help me with correct my expression?&lt;/P&gt;
&lt;P&gt;=FirstSortedValue(Aggr(Concat(DISTINCT [Brand], ','), &lt;STRONG&gt;???&lt;/STRONG&gt; ),-(Aggr(Sum({&amp;lt; Fakt = {'Fakt_A'}, year = {'2023'}&amp;gt;}[#Reg]), [Area],[Brand])))&lt;/P&gt;
&lt;P&gt;I am trying to find the correct part of the code instead of &lt;STRONG&gt;???&lt;/STRONG&gt; but without success. I have already tried everything, except the correct result of course.&lt;/P&gt;
&lt;P&gt;Thank you&lt;BR /&gt;Palo&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 14:23:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2146315#M1225015</guid>
      <dc:creator>palo173</dc:creator>
      <dc:date>2023-12-11T14:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2152059#M1225025</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/91057"&gt;@palo173&lt;/a&gt;&amp;nbsp;, I would suggest to create a sample qvf and explain your expected output w.r.t. that sample data and context. Share the qvf here or create a new thread; that's a better chance for you towards solution.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 14:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2152059#M1225025</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2023-12-12T14:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2152372#M1225028</link>
      <description>&lt;P&gt;Thank you for reaction &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;. I apologize for missing&amp;nbsp; explanation. I use excel for it.&lt;BR /&gt;Source data are in columns A:E. &lt;BR /&gt;Pivot with conditions and calculations are in columns H:J.&lt;BR /&gt;And result is in M4:N7. I tried to find Bands or multiple Brands, which have the most Reg in Area.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=FirstSortedValue(Aggr(Concat(DISTINCT [Brand], ','),&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;???&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;),-(Aggr(Sum({&amp;lt; Fakt = {'Fakt_A'}, year = {'2023'}&amp;gt;}[#Reg]), [Area],[Brand])))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="palo173_2-1702457786617.png" style="width: 564px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125320iADDDEB733D71FAD7/image-dimensions/564x219?v=v2" width="564" height="219" role="button" title="palo173_2-1702457786617.png" alt="palo173_2-1702457786617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thank you&lt;BR /&gt;Palo&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 09:02:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2152372#M1225028</guid>
      <dc:creator>palo173</dc:creator>
      <dc:date>2023-12-13T09:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2152634#M1225033</link>
      <description>&lt;P&gt;Try the below expression:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;=Concat(distinct Aggr(If(Sum(Reg) = Max(total Aggr(Sum(Reg), &lt;BR /&gt;Area, Brand)), Brand), Area, Brand), ',')&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 16:10:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2152634#M1225033</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2023-12-13T16:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue()_Multiple dimension values with same sort order</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2152877#M1225035</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22949"&gt;@tresB&lt;/a&gt;&amp;nbsp;&amp;nbsp;It works without parameters, but when I add "year" and "Fakt", it is not right. Please, what is wrong?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=Concat(distinct Aggr(If(Sum({&amp;lt; Fakt = {'Fakt_A'}, Rok = {'2023'}&amp;gt;}Reg) = Max(total Aggr(Sum({&amp;lt; Fakt = {'Fakt_A'}, Rok = {'2023'}&amp;gt;}Reg), Area, Brand)), Brand), Area, Brand), ',')&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="palo173_0-1702540655837.png" style="width: 546px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125415iDE22FB0431FE466F/image-dimensions/546x143?v=v2" width="546" height="143" role="button" title="palo173_0-1702540655837.png" alt="palo173_0-1702540655837.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;the correct result should be:&lt;/P&gt;
&lt;TABLE width="156"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="79"&gt;Area&lt;/TD&gt;
&lt;TD width="77"&gt;Brands&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;TD&gt;B1, B2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;TD&gt;B1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;C&lt;/TD&gt;
&lt;TD&gt;B1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LOAD * inline [&lt;BR /&gt;Fakt|year|Area|Brand|Reg&lt;BR /&gt;Fakt_A|2023|A|B1|1&lt;BR /&gt;Fakt_A|2023|A|B1|1&lt;BR /&gt;Fakt_A|2023|A|B2|1&lt;BR /&gt;Fakt_A|2023|A|B2|1&lt;BR /&gt;Fakt_A|2023|B|B1|1&lt;BR /&gt;Fakt_A|2023|B|B1|1&lt;BR /&gt;Fakt_A|2023|B|B2|1&lt;BR /&gt;Fakt_A|2023|C|B1|1&lt;BR /&gt;Fakt_A|2022|C|B2|1&lt;BR /&gt;Fakt_A|2022|C|B2|1&lt;BR /&gt;Fakt_A|2022|C|B2|1&lt;BR /&gt;Fakt_B|2023|A|B1|1&lt;BR /&gt;Fakt_B|2023|A|B2|1&lt;BR /&gt;Fakt_B|2022|B|B1|1&lt;BR /&gt;] (delimiter is '|');&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 08:03:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue-Multiple-dimension-values-with-same-sort-order/m-p/2152877#M1225035</guid>
      <dc:creator>palo173</dc:creator>
      <dc:date>2023-12-14T08:03:37Z</dc:date>
    </item>
  </channel>
</rss>

