<?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: Return a field value over Max(date) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36554#M6146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Aggr(MaxString({&amp;lt;CODE_EXT={'21','22'}&amp;gt;}&amp;nbsp; Location), COD_ITEM, TYPE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;or may be simple maxstring(location)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Apr 2018 17:41:24 GMT</pubDate>
    <dc:creator>sasiparupudi1</dc:creator>
    <dc:date>2018-04-30T17:41:24Z</dc:date>
    <item>
      <title>Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36553#M6145</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 a Qlik table with all itens transactions records like this sample:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="201115" alt="Screenshot_2.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/201115_Screenshot_2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I want a analysis with these Layout:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="201114" alt="Screenshot_1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/201114_Screenshot_1.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where Last transaction is a calculated dimension with this expression:&lt;/P&gt;&lt;P&gt;=Aggr(Max({&amp;lt;CODE_EXT={'21','22'}&amp;gt;}&amp;nbsp; DATE_TRANSACTION), COD_ITEM, TYPE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need Location shows the correctly value for a combination of Item Code, Type and Transaction Date, but I couldn't find an expression that fits. Tried a simple =CODE_LOCATION, but without success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If someone need the qvw code, I can put this later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tks for suggestions!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 16:36:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36553#M6145</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-30T16:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36554#M6146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Aggr(MaxString({&amp;lt;CODE_EXT={'21','22'}&amp;gt;}&amp;nbsp; Location), COD_ITEM, TYPE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;or may be simple maxstring(location)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 17:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36554#M6146</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2018-04-30T17:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36555#M6147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or try like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Firstsortedvalue(CODE_LOCATION, Aggr(Max({&amp;lt;CODE_EXT={'21','22'}&amp;gt;}&amp;nbsp; DATE_TRANSACTION), COD_ITEM, TYPE))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 17:55:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36555#M6147</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-04-30T17:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36556#M6148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This don't worked.&lt;/P&gt;&lt;P&gt;With this expression, i get tha last Location for that Set Analisys, and I want the corresponding Location for that Max(date), Item Code and Type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct values, are EXP on both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screenshot_4.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/201124_Screenshot_4.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 18:29:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36556#M6148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-30T18:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36557#M6149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;This don't worked.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;With this expression, the Firstsortedvalue shows CQ for Entrada Type. &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: #000000;"&gt;The correct values, are EXP on both.&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: #000000;"&gt;&lt;IMG alt="Screenshot_3.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/201131_Screenshot_3.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 18:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36557#M6149</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-30T18:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36558#M6150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share a sample app you are trying this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 18:54:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36558#M6150</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-04-30T18:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36559#M6151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post updated with a sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 19:13:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36559#M6151</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-30T19:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36560#M6152</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-size: 8pt; text-decoration: line-through;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; text-decoration: line-through;"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; text-decoration: line-through;"&gt;CODE_LOCATION&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, -&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; text-decoration: line-through;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; text-decoration: line-through;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; text-decoration: line-through;"&gt;CODE_EXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'21','22'} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; text-decoration: line-through;"&gt;DATE_TRANSACTION&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; text-decoration: line-through;"&gt;COD_ITEM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; text-decoration: line-through;"&gt;TYPE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt; text-decoration: line-through;"&gt;COD_ITEM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sorry try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CODE_LOCATION&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, -&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CODE_EXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'21','22'} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DATE_TRANSACTION&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;COD_ITEM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TYPE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CODE_EXT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 19:45:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36560#M6152</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-04-30T19:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36561#M6153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try&lt;/P&gt;&lt;P&gt;SubField(Maxstring(Aggr(concat(Distinct If(Match(CODE_EXT,21,22),CODE_LOCATION &amp;amp;'|'&amp;amp; DATE_TRANSACTION),','),DATE_TRANSACTION)),'|',1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 21:01:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36561#M6153</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2018-04-30T21:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36562#M6154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue({&amp;lt;CODE_EXT={'21','22'}&amp;gt;} CODE_LOCATION, -Aggr(Max({&amp;lt;CODE_EXT={'21','22'} &amp;gt;} DATE_TRANSACTION), COD_ITEM, TYPE))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 11:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36562#M6154</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-01T11:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36563#M6155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tks guys. That's FirstSortedValue() was the function that I needed.&lt;/P&gt;&lt;P&gt;Never used it before, and now I learned a new one. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to discuss a bit more for performance purposes and best practices.&lt;/P&gt;&lt;P&gt;We have 2 basics ways to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Vishwarath suggestion, the first parameter have only a field, but in Aggr() we need to add the CODE_EXT field.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;=&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;CODE_LOCATION&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;, -&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;CODE_EXT&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;={'21','22'} &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;DATE_TRANSACTION&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;COD_ITEM&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;TYPE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #800000;"&gt;CODE_EXT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;In Sunny suggestion, the set analysis shows again into first parameter, but the Aggr() have one field less to group.&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue({&amp;lt;CODE_EXT={'21','22'}&amp;gt;} CODE_LOCATION, -Aggr(Max({&amp;lt;CODE_EXT={'21','22'} &amp;gt;} DATE_TRANSACTION), COD_ITEM, TYPE))&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Someone could evaluate which one cost less, and why?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my app, i have almost 10 million of transaction records, and the performance is something i have to consider to make qvw fast.&lt;/P&gt;&lt;P&gt;I believe the first one cost less, because the processing are made once in Aggr(), and FirstSortedValue() have only to shows CODE_LOCATION without processing, but with the experts opinions like you guys, I'm feel more comfortable to decide.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 11:36:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36563#M6155</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-02T11:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36564#M6156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tks for suggestion Sasidhar, it worked too. But this solutions don't looks simple enough to this simple problem, and could sounds a bit confuse to others developers in case of maintaining the app code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciated your time to help me with this issue. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 11:41:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36564#M6156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-02T11:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36565#M6157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my opinion, the second one might work better.... but I have not done any testing to prove it. The reason I think it will work better is because Aggr() function creates an imaginary table with the dimensions you list in the Aggr() function. The imaginary table is similar to a straight table and which one do you think will render faster in a straight table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) 3 dimensions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) 2 dimensions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think 2 dimensions will perform at least as good as 3 dimensions if not better....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, I have not done any testing to prove that this is right, but may be &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt;‌, &lt;A href="https://community.qlik.com/qlik-users/2286"&gt;rwunderlich&lt;/A&gt;‌, &lt;A href="https://community.qlik.com/qlik-users/2310"&gt;troyansky&lt;/A&gt;‌, or &lt;A href="https://community.qlik.com/qlik-users/27943"&gt;marcus_sommer&lt;/A&gt;‌ can share there opinions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 11:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36565#M6157</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-02T11:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36566#M6158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I will make the tests right now, and will post here the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The point you mentioned is valid, no doubt about the Aggr with 2 dimensions will performing better, but besides that, we have one extra calculation step in FirstSortedValue() function, the evaluate of set analysis again.&lt;/P&gt;&lt;P&gt;That was the point that brings me the question, but your argument convinces me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Soon I will come back with real tests results, that should support our discussion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 11:53:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36566#M6158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-02T11:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36567#M6159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set analysis is evaluated once per chart.... so in my opinion, it shouldn't be taxing enough to offset the use of 2 dimensions.... but if you are doing some tests, I would be eager to know which one worked better.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 11:55:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36567#M6159</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-02T11:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36568#M6160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not go through the entire discussion. Therefore, I might be wrong missing some. I was wondering if a simpler expression could work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FirstSortedValue({&amp;lt;CODE_EXT={'21','22'}&amp;gt;} CODE_LOCATION, -DATE_TRANSACTION)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since, you are using the set analysis in firstsortedvalue() already, the &lt;SPAN style="font-size: 13.3333px;"&gt;DATE_TRANSACTION&lt;/SPAN&gt; would consider the filter before sorting them, hence an additional aggr() and max() might not be required (the aggregation at dimensions are already happening since they are there in the chart as dimensions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, the third calculated dimension should probably be used as an expression (&lt;SPAN style="font-family: 'courier new', courier;"&gt;Max({&amp;lt;CODE_EXT={'21','22'}&amp;gt;}&amp;nbsp; date(DATE_TRANSACTION))&lt;/SPAN&gt;) that could again help do away with aggr().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 12:11:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36568#M6160</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-05-02T12:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36569#M6161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hummm.... &lt;/P&gt;&lt;P&gt;Is very good to know Set Analysis evaluated once per chart. So, i think this make simple the comparison of the expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With 1 set analysis and Aggr() with 3 dimensions: 7.88 seconds to render.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;With 2 set analysis and Aggr() with 2 dimensions: 2.70 seconds to render.&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;Tks so much for discussion. Always nice learn with experienced ones. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I think there's no loose ends in this issue.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 12:18:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36569#M6161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-02T12:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36570#M6162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But you might have had a winner in &lt;A href="https://community.qlik.com/people/tresesco"&gt;tresesco&lt;/A&gt;‌'s expression... I have not checked it... but what he mentioned makes sense to me and should perform better then either of the two above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 12:20:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36570#M6162</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-02T12:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36571#M6163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes... for me too. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 12:25:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36571#M6163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-02T12:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Return a field value over Max(date)</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36572#M6164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Totally sense.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Once DATE_TRANSACTION will consider the filter, no need to use Aggr() with other stuffs.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Perfect.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Tks for advice!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 12:25:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-field-value-over-Max-date/m-p/36572#M6164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-02T12:25:53Z</dc:date>
    </item>
  </channel>
</rss>

