<?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: Re: FirstSortedValue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495517#M548948</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;"&gt;How about:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier;"&gt;=FirstSortedValue(&lt;STRONG&gt;DISTINCT&lt;/STRONG&gt; Aggr(Min(Price),PartNumber,InvoiceDate),-InvoiceDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jan 2014 19:57:25 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2014-01-10T19:57:25Z</dc:date>
    <item>
      <title>FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495507#M548938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dimension&lt;/P&gt;&lt;P&gt;PartNumber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression&lt;/P&gt;&lt;P&gt;FirstSortedValue(Price,-InvoiceDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Giving me '-' whenever same part number is sold more than once on the same date.&lt;/P&gt;&lt;P&gt;2) What if same part number is sold more than once with different price&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Idea is to get Minimum Price for each part number sold on the latest Date...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 12:59:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495507#M548938</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-10T12:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495508#M548939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Aggr(Min(Price),PartNumber,InvoiceDate),-InvoiceDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 13:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495508#M548939</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-01-10T13:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495509#M548940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henric,&lt;/P&gt;&lt;P&gt;Its not working...&lt;/P&gt;&lt;P&gt;Please check enclosed file..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 13:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495509#M548940</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-10T13:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495510#M548941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do it using a cross-table and the Above() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LastPrice = If(IsNull(Min(Price)),Above(LastPrice),Min(Price))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="LastPrice.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/51352_LastPrice.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495510#M548941</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-01-10T14:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495511#M548942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Henric,&lt;/P&gt;&lt;P&gt;Thanks for your valuable time but this will not work for me...&lt;/P&gt;&lt;P&gt;I have around 80,000 part numbers...&lt;/P&gt;&lt;P&gt;The preferable solution should be as per below table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 270px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="22" width="108"&gt;PartNumber&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="47"&gt;MinPrice&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="115"&gt;MaxInvoiceDate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="21"&gt;A&lt;/TD&gt;&lt;TD class="xl68" style="border-left: none;"&gt;105&lt;/TD&gt;&lt;TD class="xl69" style="border-left: none;"&gt;08/01/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="21" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl71" style="border-top: none; border-left: none;"&gt;110&lt;/TD&gt;&lt;TD class="xl72" style="border-top: none; border-left: none;"&gt;04/01/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="21" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl71" style="border-top: none; border-left: none;"&gt;130&lt;/TD&gt;&lt;TD class="xl72" style="border-top: none; border-left: none;"&gt;10/01/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl73" height="22" style="border-top: none;"&gt;D&lt;/TD&gt;&lt;TD class="xl74" style="border-top: none; border-left: none;"&gt;110&lt;/TD&gt;&lt;TD class="xl75" style="border-top: none; border-left: none;"&gt;07/01/2014&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 14:35:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495511#M548942</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-10T14:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495512#M548943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any reply on this?&lt;/P&gt;&lt;P&gt;Your help would be highly appreciated...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 16:52:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495512#M548943</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-10T16:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495513#M548944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might not be the most elegant, but you could sort using the concat function. Try this out:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subfield(concat(aggr(min(Price), PartNumber, InvoiceDate), '|', -InvoiceDate), '|', 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 16:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495513#M548944</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-01-10T16:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495514#M548945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tricky and working but still would love to get another way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 17:20:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495514#M548945</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-10T17:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495515#M548946</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;This will give you the result:&lt;/P&gt;&lt;P&gt;=FirstSortedValue(Aggr(Min(Price),PartNumber,InvoiceDate),-aggr(InvoiceDate, PartNumber, InvoiceDate))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 19:21:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495515#M548946</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-01-10T19:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495516#M548947</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;Here is my suggestion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Min(if(InvoiceDate=aggr(NODISTINCT Max(InvoiceDate), PartNumber),&amp;nbsp; Price))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 19:32:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495516#M548947</guid>
      <dc:creator />
      <dc:date>2014-01-10T19:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495517#M548948</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;"&gt;How about:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier;"&gt;=FirstSortedValue(&lt;STRONG&gt;DISTINCT&lt;/STRONG&gt; Aggr(Min(Price),PartNumber,InvoiceDate),-InvoiceDate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 19:57:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495517#M548948</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-01-10T19:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495518#M548949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works, but I don't understand why &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, 10 Jan 2014 20:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495518#M548949</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-01-10T20:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495519#M548950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So after a very hard and tired day, I got some useful solutions.&lt;/P&gt;&lt;P&gt;Jerem&lt;/P&gt;&lt;P&gt;SubField(CONCAT(Aggr(MIN(Price),PartNumber,InvoiceDate),'|',-InvoiceDate),'|',1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B Aydin&lt;/P&gt;&lt;P&gt;Min(If(InvoiceDate = Aggr(NODISTINCT Max(InvoiceDate), PartNumber), Price))&lt;/P&gt;&lt;P&gt;Would appreciate if you explain to understand the use of NODISTINCT in this expression...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;FirstSortedValue(DISTINCT Aggr(Min(Price),PartNumber,InvoiceDate),-InvoiceDate)&lt;/P&gt;&lt;P&gt;Hi Rob, What is the reason of getting syntex error (red lines) in expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whiteline&lt;/P&gt;&lt;P&gt;FirstSortedValue(Aggr(Min(Price),PartNumber,InvoiceDate),-Aggr(InvoiceDate, PartNumber, InvoiceDate))&lt;/P&gt;&lt;P&gt;Can anyone try to explain how above expression is working? Want to understand the magic behind two InvoiceDate in single Aggr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all for your support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 21:43:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495519#M548950</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-10T21:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495520#M548951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"... Hi Rob, What is the reason of getting syntax error (red lines) in expression?"&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DISTINCT appeared in the doc some time back (I think an early QV10 SR) but the syntax checker was never updated. (or may have worked for a while -- can't recall). The red squiggle is probably why most people don't know about DISTINCT in FirstSortedValue &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;. Welcome to the club.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 23:25:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495520#M548951</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-01-10T23:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: FirstSortedValue</title>
      <link>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495521#M548952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks ROB.... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Jan 2014 09:00:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/FirstSortedValue/m-p/495521#M548952</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-01-11T09:00:42Z</dc:date>
    </item>
  </channel>
</rss>

