<?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 Mapping load : search for record with latest date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342524#M706195</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is your problem is to get the latest price of the article?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Mar 2012 09:26:21 GMT</pubDate>
    <dc:creator>CELAMBARASAN</dc:creator>
    <dc:date>2012-03-08T09:26:21Z</dc:date>
    <item>
      <title>Mapping load : search for record with latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342523#M706194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do have a tabel containing all invoice prices for articles;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to combine this 'latest/current price' in my main tabel containing all articles. This in the script, not in my presentation layer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use a 'mapping load' where I an searching on article number and returning the price. However this would return the first available record for this article.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How could I use a mapping where a 'date' parameter should also be applied&amp;nbsp; : search on 'latest' &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mapLatestPrice&lt;/P&gt;&lt;P&gt;mapping Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Article_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Price&lt;/P&gt;&lt;P&gt;resident Invoices;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mapLatestDate&lt;/P&gt;&lt;P&gt;mapping Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Article_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Price&lt;/P&gt;&lt;P&gt;resident Invoices;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ApplyMap &lt;SPAN style="color: #000000; font-size: 8pt;"&gt;('mapLatestPrice',Article&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;,'0') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS Articel&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;.LatestPrice,&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ApplyMap &lt;SPAN style="color: #000000; font-size: 8pt;"&gt;('mapLatestDate',Article&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;,'') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS Articel&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;.LatestDate,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the invoices table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 342px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; width: 48pt; height: 15pt; border: #f0f0f0;" width="64"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;article&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="background-color: transparent; width: 112pt; border: #f0f0f0;" width="149"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;Price&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="background-color: transparent; width: 97pt; border: #f0f0f0;" width="129"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;date&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;&lt;/TD&gt;&lt;TD style="background-color: transparent; border: #f0f0f0;"&gt;&lt;/TD&gt;&lt;TD style="background-color: transparent; border: #f0f0f0;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD align="right" height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;1002&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="background-color: transparent; border: #f0f0f0;"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;12,5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="background-color: transparent; border: #f0f0f0;"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;1-1-2012&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD align="right" height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;1002&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="background-color: transparent; border: #f0f0f0;"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;13,5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="background-color: transparent; border: #f0f0f0;"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;31-1-2012&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD align="right" height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;1002&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="background-color: transparent; border: #f0f0f0;"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="background-color: transparent; border: #f0f0f0;"&gt;&lt;SPAN style="font-family: Calibri; color: #000000; font-size: 12pt;"&gt;30-6-2011&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the second record should obvious be the result and not the first record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 09:15:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342523#M706194</guid>
      <dc:creator>andries_bos</dc:creator>
      <dc:date>2012-03-08T09:15:28Z</dc:date>
    </item>
    <item>
      <title>Mapping load : search for record with latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342524#M706195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is your problem is to get the latest price of the article?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 09:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342524#M706195</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-03-08T09:26:21Z</dc:date>
    </item>
    <item>
      <title>Mapping load : search for record with latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342525#M706196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Is it in some way possible to add a search 'filter' to mapping load e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mapLatestPrice&lt;/P&gt;&lt;P&gt;mapping Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Article_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Price&lt;/P&gt;&lt;P&gt;resident Invoices &lt;STRONG&gt;where highest(date)&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 09:30:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342525#M706196</guid>
      <dc:creator>andries_bos</dc:creator>
      <dc:date>2012-03-08T09:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping load : search for record with latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342526#M706197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Check with this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Article_ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Price,-Num(Date)) as Price&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Invoices Group By Article_ID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 09:32:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342526#M706197</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-03-08T09:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping load : search for record with latest date</title>
      <link>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342527#M706198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The above script will give you a null value if there are more records of article with same date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If possible order your Invoice table in the way with the date and article id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Invoices Order by Article_ID asc,Date desc;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then you can write Script as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Article_ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstValue(Price) as Price&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Invoices Group By Article_ID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 09:44:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mapping-load-search-for-record-with-latest-date/m-p/342527#M706198</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-03-08T09:44:24Z</dc:date>
    </item>
  </channel>
</rss>

