<?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: Value related to Most Recent Date in other data set before date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387895#M31866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jason,&lt;/P&gt;&lt;P&gt;this is in Front End, not in script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Oct 2017 09:31:08 GMT</pubDate>
    <dc:creator>antoniotiman</dc:creator>
    <dc:date>2017-10-18T09:31:08Z</dc:date>
    <item>
      <title>Value related to Most Recent Date in other data set before date</title>
      <link>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387892#M31863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to get a dataset to look up the most recent value relating to a dataset comparing dates and pick the most recent occurance before the date i specify.. heres two data sets for examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lookup:&lt;/P&gt;&lt;P&gt;LOAD * inline [&lt;/P&gt;&lt;P&gt;Customer|Product|OrderNumber|UnitSales|CustomerID|Date&lt;/P&gt;&lt;P&gt;Astrida|AA|1|10|1|01/01/2017&lt;/P&gt;&lt;P&gt;Astrida|AA|7|18|1|01/01/2016&lt;/P&gt;&lt;P&gt;Astrida|BB|4|9|1|01/05/2016&lt;/P&gt;&lt;P&gt;Astrida|CC|6|2|1|12/02/2017&lt;/P&gt;&lt;P&gt;Betacab|AA|5|4|2|10/02/2017&lt;/P&gt;&lt;P&gt;Betacab|BB|2|5|2|01/02/2017&lt;/P&gt;&lt;P&gt;Betacab|DD|12|25|2|01/03/2017&lt;/P&gt;&lt;P&gt;Canutility|BB|3|8|3|01/04/2017&lt;/P&gt;&lt;P&gt;Canutility|CC|13|19|3|01/03/2017&lt;/P&gt;&lt;P&gt;Divadip|AA|9|16|4|01/04/2017&lt;/P&gt;&lt;P&gt;Divadip|AA|10|16|4|01/05/2016&lt;/P&gt;&lt;P&gt;Divadip|DD|11|10|4|01/03/2017&lt;/P&gt;&lt;P&gt;] (delimiter is '|');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * inline [&lt;/P&gt;&lt;P&gt;Customer|Date2&lt;/P&gt;&lt;P&gt;Astrida|01/02/2017&lt;/P&gt;&lt;P&gt;Betacab|11/02/2017&lt;/P&gt;&lt;P&gt;Canutility|01/04/2017&lt;/P&gt;&lt;P&gt;Divadip|03/04/2017&lt;/P&gt;&lt;P&gt;] (delimiter is '|');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to lookup using Temp table Date2 the most recent values in the lookup table, so my expected results would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Customer&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date2&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Most Recent Date Prior to Date 2 from Lookup&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Product @ this date&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Astrida&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/02/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/01/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Betacab&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;11/02/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10/02/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Canutility&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/04/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/04/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Divadip&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;03/04/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/04/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i've tried using FirstSortedValue but i cannot build in the part where it ignores any dates greater than the Date2 to lookup from.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 08:36:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387892#M31863</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-18T08:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Value related to Most Recent Date in other data set before date</title>
      <link>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387893#M31864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(DISTINCT Product,-(Aggr(If(Date2 &amp;gt;= Date,Date),Customer,Date))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date2&lt;/SPAN&gt; &amp;gt;= &lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;),&lt;SPAN style="color: #800000;"&gt;Customer&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/180037_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Antonio&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 09:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387893#M31864</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-10-18T09:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Value related to Most Recent Date in other data set before date</title>
      <link>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387894#M31865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonio - thanks for your help - i think it isnt working currently as the tables are not linked, but see the error below. How would you link the two, i initially was planning on doing an ApplyMap or something or a FirstSortedValue, but as it's looking across tables im not sure its working. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see below: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/180031_Capture.PNG" style="height: 493px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 09:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387894#M31865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-18T09:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Value related to Most Recent Date in other data set before date</title>
      <link>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387895#M31866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jason,&lt;/P&gt;&lt;P&gt;this is in Front End, not in script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 09:31:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387895#M31866</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-10-18T09:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Value related to Most Recent Date in other data set before date</title>
      <link>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387896#M31867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, is there a scripted version or a solution for script as i would like to basically apply the most recent product type and append the two tables together using the most recent date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My ideal output would be as per the table above as i would like to use this across data historically to say what product somebody was on at the time of an event (basically the lookup table will be a historical information table for each customer, but there will be changes over time to product or other values)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 09:34:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387896#M31867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-18T09:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Value related to Most Recent Date in other data set before date</title>
      <link>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387897#M31868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Script Version&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Lookup:&lt;/SPAN&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; * &lt;SPAN style="color: #0000ff;"&gt;inline&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[&lt;BR /&gt; Customer|Product|OrderNumber|UnitSales|CustomerID|Date&lt;BR /&gt; Astrida|AA|1|10|1|01/01/2017&lt;BR /&gt; Astrida|AA|7|18|1|01/01/2016&lt;BR /&gt; Astrida|BB|4|9|1|01/05/2016&lt;BR /&gt; Astrida|CC|6|2|1|12/02/2017&lt;BR /&gt; Betacab|AA|5|4|2|10/02/2017&lt;BR /&gt; Betacab|BB|2|5|2|01/02/2017&lt;BR /&gt; Betacab|DD|12|25|2|01/03/2017&lt;BR /&gt; Canutility|BB|3|8|3|01/04/2017&lt;BR /&gt; Canutility|CC|13|19|3|01/03/2017&lt;BR /&gt; Divadip|AA|9|16|4|01/04/2017&lt;BR /&gt; Divadip|AA|10|16|4|01/05/2016&lt;BR /&gt; Divadip|DD|11|10|4|01/03/2017&lt;BR /&gt; ]&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;delimiter&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;is&lt;/SPAN&gt; '|');&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Left&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Join&lt;/SPAN&gt;&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; * &lt;SPAN style="color: #0000ff;"&gt;inline&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[&lt;BR /&gt; Customer|Date2&lt;BR /&gt; Astrida|01/02/2017&lt;BR /&gt; Betacab|11/02/2017&lt;BR /&gt; Canutility|01/04/2017&lt;BR /&gt; Divadip|03/04/2017&lt;BR /&gt; ]&lt;/SPAN&gt; (&lt;SPAN style="color: #0000ff;"&gt;delimiter&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;is&lt;/SPAN&gt; '|');&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Inner&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Join&lt;/SPAN&gt;&lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="color: #800000;"&gt;Customer&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;Max&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date2&lt;/SPAN&gt; &amp;gt;= &lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;)) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Resident&lt;/SPAN&gt; Lookup&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Group&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;By&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Customer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/180053_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 09:52:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387897#M31868</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-10-18T09:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Value related to Most Recent Date in other data set before date</title>
      <link>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387898#M31869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this worked perfectly for what i needed - thanks &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, 18 Oct 2017 13:49:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Value-related-to-Most-Recent-Date-in-other-data-set-before-date/m-p/1387898#M31869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-18T13:49:38Z</dc:date>
    </item>
  </channel>
</rss>

