<?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: Loading max date entry? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605100#M223549</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peter that works perfectly! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Feb 2014 12:10:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-04T12:10:38Z</dc:date>
    <item>
      <title>Loading max date entry?</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605097#M223546</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;I am having a problem where I am trying to load monthly customer files and customers appear in more than one monthly file but sometimes with updated names etc. So I am trying to load the Customer ID and the Customer Names but only from the file with the latest date that each customer appears in. I have got it to the point where I have a date and I am using a peek function I am just not sure how to use the date in the peek function so that it gives me what I want. So in the excel block below I only want to load the last line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="250"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="18" width="87"&gt;CustomerID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="86"&gt;Customer Name&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="77"&gt;FileDates&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.01.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.02.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.03.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.04.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.05.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.06.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.07.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.08.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.09.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.10.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Store A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;01.11.2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl67" height="18" style="border-top: none;"&gt;100535&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;Store B&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;01.12.2013&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I am using the following script but it is not working 100% - does anyone have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD FileDates,&lt;/P&gt;&lt;P&gt;&amp;nbsp; CustomerID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(peek(CustomerID)=CustomerID and FileDates &amp;lt; peek(FileDates),Null(),[Customer Name]) as [Customer Name]&lt;/P&gt;&lt;P&gt;RESIDENT Customers&lt;/P&gt;&lt;P&gt;order by CustomerID, FileDates ASC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 11:50:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605097#M223546</guid>
      <dc:creator />
      <dc:date>2014-02-04T11:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Loading max date entry?</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605098#M223547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use FirstsortedValue() to get the most recent Customer Name. You can use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD CustomerID, FirstSortedValue(CustomerName, -num(FileDates)) AS CustomerName&lt;/P&gt;&lt;P&gt;RESIDENT CUSTOMERS&lt;/P&gt;&lt;P&gt;GROUP BY CustomerID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure that FileDates contains a QlikView date field (e.g. string &amp;amp; numerical representation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 12:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605098#M223547</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-02-04T12:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Loading max date entry?</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605099#M223548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 12:07:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605099#M223548</guid>
      <dc:creator />
      <dc:date>2014-02-04T12:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loading max date entry?</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605100#M223549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Peter that works perfectly! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 12:10:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605100#M223549</guid>
      <dc:creator />
      <dc:date>2014-02-04T12:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Loading max date entry?</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605101#M223550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FirstSortedValue() is a great function for another problem. Imagine that for every Customer ID you want to list the last CustomerName AND some details that belong to the same specific record. A GROUP BY doesn't allow you to grab details that aren't aggregated or present in the GROUP BY clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue() fixes that because you can get the details from that same record (with the most recent name) by repeating the FirstSortedValue() expression on additional fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure you'll encounter a situation like that sooner or later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 12:16:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-max-date-entry/m-p/605101#M223550</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-02-04T12:16:49Z</dc:date>
    </item>
  </channel>
</rss>

