<?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: Last() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-function/m-p/918622#M987141</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need for this firstsortedvalue([Latest Promise Date], -[Latest Promise Date]).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jul 2015 19:09:51 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2015-07-28T19:09:51Z</dc:date>
    <item>
      <title>Last() function</title>
      <link>https://community.qlik.com/t5/QlikView/Last-function/m-p/918621#M987140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to pull values into a straight table using the Last() function. &lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/94328_Capture.JPG" style="height: 117px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;This is what my table looks like now, however the dates are incorrect. I need to pull in the last promise date and last delivery dates for each of the values on the left. All of the numbers on the left have different lives, so some go from, for example, March to April, or possibly May14-20, or May through June 15. The timeline of the left numbers vary greatly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data is loaded into Qlikview using many different Excel files and many load statements, otherwise I would use LastValue(), although that might end up being the easiest way to do this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 19:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-function/m-p/918621#M987140</guid>
      <dc:creator />
      <dc:date>2015-07-28T19:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Last() function</title>
      <link>https://community.qlik.com/t5/QlikView/Last-function/m-p/918622#M987141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need for this firstsortedvalue([Latest Promise Date], -[Latest Promise Date]).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 19:09:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-function/m-p/918622#M987141</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-07-28T19:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Last() function</title>
      <link>https://community.qlik.com/t5/QlikView/Last-function/m-p/918623#M987142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that but it only worked for the sales doc #s that only had one promise date and one delivery date inputted, the rest came up null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 20:37:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-function/m-p/918623#M987142</guid>
      <dc:creator />
      <dc:date>2015-07-28T20:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Last() function</title>
      <link>https://community.qlik.com/t5/QlikView/Last-function/m-p/918624#M987143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, firstsortedvalue() had the limitation that it only worked if the rank-place is unique - sometimes you could adjust this with a set analysis within the expression but I think you should max() give a try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date(max([Latest Promise Date]), 'MM/DD/YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And last() is a inter-record function and isn't suitable for this then it's only for pivot-tables available and inter-record function calculates in context to other rows and columns within the pivot and not against the dataset itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 07:02:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-function/m-p/918624#M987143</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-07-29T07:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Last() function</title>
      <link>https://community.qlik.com/t5/QlikView/Last-function/m-p/918625#M987144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use peek Function to get last field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In script .&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Let vLastvalue =&amp;nbsp; Peek('FieldName',-1,'TableName');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;or &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;date(maxstring([Latest Promise Date]), 'MM/DD/YYYY')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 07:06:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-function/m-p/918625#M987144</guid>
      <dc:creator>sunilkumarqv</dc:creator>
      <dc:date>2015-07-29T07:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Last() function</title>
      <link>https://community.qlik.com/t5/QlikView/Last-function/m-p/918626#M987145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried max() and it gives me the highest value, not the last value. I just tried Aggr(FirstSortedValue(,-[Date]),[Sales Doc. &amp;amp; Line No.] which works better.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 16:56:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-function/m-p/918626#M987145</guid>
      <dc:creator />
      <dc:date>2015-07-29T16:56:40Z</dc:date>
    </item>
  </channel>
</rss>

