<?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 join tables based on max date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/join-tables-based-on-max-date/m-p/206205#M62415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables, Purchases and Electronic that have the same fields. I want to take max weekend from Purchases tables, and then load data from Electronic table which is posted after max weekend from Purchases table.&lt;/P&gt;&lt;P&gt;So if max weekend in Purchases is 01/16/2011, then I want to load just data from Electronic that has been posted after 01/16/2011.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Purchases:&lt;BR /&gt;LOAD&lt;BR /&gt;Store,&lt;BR /&gt;GL,&lt;BR /&gt;(Amount)*-1 as Amount,&lt;BR /&gt;Weekend(postDate) as Weekend;&lt;/P&gt;&lt;P&gt;SQL SELECT ... ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Electronic:&lt;BR /&gt;LOAD&lt;BR /&gt;GL,&lt;BR /&gt;Weekend(PostDate) as Weekend,&lt;BR /&gt;Store,&lt;BR /&gt;PurchasesElectronic*-1 as Amount&lt;/P&gt;&lt;P&gt;SQL SELECT ... ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Feb 2011 20:36:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-08T20:36:53Z</dc:date>
    <item>
      <title>join tables based on max date</title>
      <link>https://community.qlik.com/t5/QlikView/join-tables-based-on-max-date/m-p/206205#M62415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tables, Purchases and Electronic that have the same fields. I want to take max weekend from Purchases tables, and then load data from Electronic table which is posted after max weekend from Purchases table.&lt;/P&gt;&lt;P&gt;So if max weekend in Purchases is 01/16/2011, then I want to load just data from Electronic that has been posted after 01/16/2011.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Purchases:&lt;BR /&gt;LOAD&lt;BR /&gt;Store,&lt;BR /&gt;GL,&lt;BR /&gt;(Amount)*-1 as Amount,&lt;BR /&gt;Weekend(postDate) as Weekend;&lt;/P&gt;&lt;P&gt;SQL SELECT ... ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Electronic:&lt;BR /&gt;LOAD&lt;BR /&gt;GL,&lt;BR /&gt;Weekend(PostDate) as Weekend,&lt;BR /&gt;Store,&lt;BR /&gt;PurchasesElectronic*-1 as Amount&lt;/P&gt;&lt;P&gt;SQL SELECT ... ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 20:36:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-tables-based-on-max-date/m-p/206205#M62415</guid>
      <dc:creator />
      <dc:date>2011-02-08T20:36:53Z</dc:date>
    </item>
    <item>
      <title>join tables based on max date</title>
      <link>https://community.qlik.com/t5/QlikView/join-tables-based-on-max-date/m-p/206206#M62416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try something like this:&lt;/P&gt;&lt;P&gt;Purchases:&lt;BR /&gt;LOAD&lt;BR /&gt;Store,&lt;BR /&gt;GL,&lt;BR /&gt;(Amount)*-1 as Amount,&lt;BR /&gt;Weekend(postDate) as Weekend;&lt;/P&gt;&lt;P&gt;SQL SELECT ...&lt;/P&gt;&lt;P&gt;ORDER BY postDate ASC;&lt;/P&gt;&lt;P&gt;LET varMaxWeekend = num(peek('Weekend',-1,'Purchases'));&lt;/P&gt;&lt;P&gt;Electronic:&lt;BR /&gt;LOAD&lt;BR /&gt;GL,&lt;BR /&gt;Weekend(PostDate) as Weekend,&lt;BR /&gt;Store,&lt;BR /&gt;PurchasesElectronic*-1 as Amount&lt;/P&gt;&lt;P&gt;SQL SELECT ...&lt;/P&gt;&lt;P&gt;where Weekend(PostDate) &amp;gt; $(varMaxWeekend);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 21:39:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-tables-based-on-max-date/m-p/206206#M62416</guid>
      <dc:creator />
      <dc:date>2011-02-08T21:39:18Z</dc:date>
    </item>
    <item>
      <title>join tables based on max date</title>
      <link>https://community.qlik.com/t5/QlikView/join-tables-based-on-max-date/m-p/206207#M62417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is great, thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 22:11:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/join-tables-based-on-max-date/m-p/206207#M62417</guid>
      <dc:creator />
      <dc:date>2011-02-08T22:11:36Z</dc:date>
    </item>
  </channel>
</rss>

