<?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: Aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregation/m-p/57943#M781964</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Manish. It is working. &lt;/P&gt;&lt;P&gt;Can you explain the expression :&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FirstSortedValue(Column2,-(E_DATE+Column2/100000))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Mar 2018 14:44:52 GMT</pubDate>
    <dc:creator>kinjal1645</dc:creator>
    <dc:date>2018-03-21T14:44:52Z</dc:date>
    <item>
      <title>Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation/m-p/57941#M781962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Hello,&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;SPAN style="font-size: 13.3333px;"&gt;I have following expression:&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;SPAN style="font-size: 13.3333px;"&gt;=aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if(len(concat(total&amp;lt;Column1&amp;gt; E_DATE))=0,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;aggr(if(%Column2 = MaxString(total&amp;lt;Column1&amp;gt;%Column2), %Column2),%Column2,Column1),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;aggr(if(E_DATE = MAX(total&amp;lt;Column1&amp;gt;E_DATE), %Column2),%Column2,Column1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,Column1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,%Column2)&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&gt; Input table&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1px" cellpadding="0" cellspacing="0" height="320" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 652px; border-width: 1px; border-style: solid; height: 322px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="18" style="background-color: #ffffff;" width="134"&gt;Column1&lt;/TD&gt;&lt;TD style="background-color: #ffffff;" width="134"&gt;Column2&lt;/TD&gt;&lt;TD style="background-color: #ffffff;" width="134"&gt;E_DATE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;18&lt;/TD&gt;&lt;TD align="right" class="xl63" style="background-color: #ffffff;" width="134"&gt;794&lt;/TD&gt;&lt;TD class="xl63" style="background-color: #ffffff;" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;10:20:40 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;18&lt;/TD&gt;&lt;TD align="right" class="xl64" style="background-color: #ffffff;" width="134"&gt;873&lt;/TD&gt;&lt;TD class="xl64" style="background-color: #ffffff;" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;10:22:06 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;18&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;110&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;1:38:19 PM&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;18&lt;/TD&gt;&lt;TD align="right" class="xl64" style="background-color: #ffffff;" width="134"&gt;795&lt;/TD&gt;&lt;TD class="xl64" style="background-color: #ffffff;" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;10:20:41 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;18&lt;/TD&gt;&lt;TD align="right" class="xl65" style="background-color: #ffffff;" width="134"&gt;874&lt;/TD&gt;&lt;TD class="xl65" style="background-color: #ffffff;" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;10:22:06 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;18&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;114&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl68" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;1:38:19 PM&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl63" style="background-color: #ffffff;" width="134"&gt;445&lt;/TD&gt;&lt;TD class="xl63" style="background-color: #ffffff;" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;9:44:27 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl64" style="background-color: #ffffff;" width="134"&gt;407&lt;/TD&gt;&lt;TD class="xl64" style="background-color: #ffffff;" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;10:38:38 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;20&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl70" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;552&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;1:05:27 PM&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl64" style="background-color: #ffffff;" width="134"&gt;41&lt;/TD&gt;&lt;TD class="xl64" style="background-color: #ffffff;" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;9:44:26 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl65" style="background-color: #ffffff;" width="134"&gt;404&lt;/TD&gt;&lt;TD class="xl65" style="background-color: #ffffff;" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;10:38:38 AM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="18" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;20&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;548&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl68" style="background-color: #ffffff;" width="134"&gt;&lt;STRONG&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;1:05:27 PM&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Current output&lt;/STRONG&gt; with above expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="1px" cellpadding="0" cellspacing="0" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;-webkit-right&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 536px; border-width: 1px; border-style: solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="18" width="134"&gt;Column1&lt;/TD&gt;&lt;TD width="134"&gt;Column2&lt;/TD&gt;&lt;TD width="134"&gt;E_DATE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" width="134"&gt;18&lt;/TD&gt;&lt;TD align="right" class="xl69" width="134"&gt;110&lt;/TD&gt;&lt;TD class="xl67" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;1:38:19 PM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" width="134"&gt;18&lt;/TD&gt;&lt;TD align="right" class="xl71" width="134"&gt;114&lt;/TD&gt;&lt;TD class="xl68" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;&lt;STRONG&gt;2/2/2018 &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;1:38:19 PM&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" width="134"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl72" width="134"&gt;552&lt;/TD&gt;&lt;TD class="xl67" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;&lt;STRONG&gt;2/2/2018 &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;1:05:27 PM&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" width="134"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl70" width="134"&gt;548&lt;/TD&gt;&lt;TD class="xl68" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;1:05:27 PM&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Required output:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1px" cellpadding="0" cellspacing="0" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;-webkit-right&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border-width: 1px; border-style: solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="18" width="134"&gt;Column1&lt;/TD&gt;&lt;TD width="134"&gt;Column2&lt;/TD&gt;&lt;TD width="134"&gt;E_DATE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" width="134"&gt;18&lt;/TD&gt;&lt;TD align="right" class="xl71" width="134"&gt;114&lt;/TD&gt;&lt;TD class="xl68" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;1:38:19 PM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="18" width="134"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl72" width="134"&gt;552&lt;/TD&gt;&lt;TD class="xl67" width="134"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;2/2/2018 &lt;/SPAN&gt;1:05:27 PM&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Requirement: (Change above expression to get required output)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Check date against each group of column 1, display row with max date in group. And if within a group there are more rows that have same e_date than row that has max value in column 2 should be displayed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Kindly help!&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;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&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/Aggregation/m-p/57941#M781962</guid>
      <dc:creator>kinjal1645</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation/m-p/57942#M781963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a Straight Table&lt;/P&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;Column1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;Max(E_DATE)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //For Max Date&lt;/P&gt;&lt;P&gt;FirstSortedValue(Column2,-(E_DATE+Column2/100000))&amp;nbsp;&amp;nbsp; // For Column2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2018 18:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation/m-p/57942#M781963</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2018-03-20T18:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation/m-p/57943#M781964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Manish. It is working. &lt;/P&gt;&lt;P&gt;Can you explain the expression :&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FirstSortedValue(Column2,-(E_DATE+Column2/100000))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 14:44:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation/m-p/57943#M781964</guid>
      <dc:creator>kinjal1645</dc:creator>
      <dc:date>2018-03-21T14:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregation/m-p/57944#M781965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor238"&gt;&lt;/A&gt;&lt;A name="firstsortedvalue"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P class="syntax"&gt;First arguments specified - what column you need as an output&lt;/P&gt;&lt;P class="syntax"&gt;2 argument takes the expression on which we should derive the weight of object&lt;/P&gt;&lt;P class="syntax"&gt;by default&amp;nbsp; it gives in ascending order, by using "-" before your 2nd arguments , we can make it act as Descending order.&lt;/P&gt;&lt;P class="syntax"&gt;3rd argument helps&amp;nbsp; you to get the desired position in sort order( Top1 , Top2nd, Top 3rd..)&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;Hope this helps.&lt;/P&gt;&lt;P class="syntax"&gt;CY&lt;/P&gt;&lt;P class="syntax"&gt;Below is standard explanation from QLIK&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN style="background-color: #0a246a; color: #ffffff;"&gt;firstsortedvalue&lt;/SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;[{set_expression}][ &lt;SPAN class="Bold"&gt;distinct&lt;/SPAN&gt; ] [ &lt;SPAN class="Bold"&gt;total&lt;/SPAN&gt; [&amp;lt;fld {, fld}&amp;gt;]] expression [, sort_weight [, n]]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;returns the first value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; sorted by corresponding &lt;SPAN class="Italic"&gt;sort-weight&lt;/SPAN&gt; when &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; is iterated over the chart dimension(s). &lt;SPAN class="Italic"&gt;Sort-weight&lt;/SPAN&gt; should return a numeric value where the lowest value will render the corresponding value of &lt;SPAN class="Italic"&gt;expression&lt;/SPAN&gt; to be sorted first. By preceding the &lt;SPAN class="Italic"&gt;sort-value&lt;/SPAN&gt; expression with a minus sign, the function will return the last value instead. If more than one value of expression share the same lowest &lt;SPAN class="Italic"&gt;sort-order&lt;/SPAN&gt;, the function will return null. By stating an n larger than 1, you will get the nth value in order. &lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;&lt;SPAN style="background-color: #0a246a; color: #ffffff;"&gt;firstsortedvalue&lt;/SPAN&gt; ( PurchasedArticle, OrderDate )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="Code"&gt;&lt;SPAN style="background-color: #0a246a; color: #ffffff;"&gt;firstsortedvalue&lt;/SPAN&gt; ( PurchasedArticle, -OrderDate, 2 )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="Code"&gt;&lt;SPAN style="background-color: #0a246a; color: #ffffff;"&gt;firstsortedvalue&lt;/SPAN&gt; ( A/B, X*Y/3 )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="Code"&gt;&lt;SPAN style="background-color: #0a246a; color: #ffffff;"&gt;firstsortedvalue&lt;/SPAN&gt; ( distinct PurchasedArticle, OrderDate )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="Code"&gt;&lt;SPAN style="background-color: #0a246a; color: #ffffff;"&gt;firstsortedvalue&lt;/SPAN&gt; ( total PurchasedArticle, OrderDate )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="Code"&gt;&lt;SPAN style="background-color: #0a246a; color: #ffffff;"&gt;firstsortedvalue&lt;/SPAN&gt; ( total &amp;lt;Grp&amp;gt; PurchasedArticle, OrderDate )&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 15:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregation/m-p/57944#M781965</guid>
      <dc:creator>ychaitanya</dc:creator>
      <dc:date>2018-03-21T15:11:02Z</dc:date>
    </item>
  </channel>
</rss>

