<?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: Use Peek/Previous from 2 tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36220#M609613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Order Fulfillment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joining your stock to those Order rows is pretty much the easiest way to get to your end-result. Keep in mind that in the end such a solution wouldn't force you to keep any superfluous fields in your order table. Just the Flag field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As possible methodology:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a mapping table that maps each product ot its stock level.&lt;/LI&gt;&lt;LI&gt;Take your orders table, and order it by product and date. Use an ORDER BY clause when performing the next two steps. ORDER BY happens before anything else.&lt;/LI&gt;&lt;LI&gt;At the same time, whenever the previous product is different from the current one, lookup the initial stock value using the mapping table and set Flag=Y if you have enough stock and Flag=N if the initial stock cannot fulfill the requested amount. Store the remaining stock in a new column.&lt;/LI&gt;&lt;LI&gt;If the current product is the same as the previous product, compare the remaining stock of the previous row to the ordered amount. S&lt;SPAN style="font-size: 13.3333px;"&gt;et Flag=Y if you still have enough stock and Flag=N if the previous stock cannot fulfill the requested amount. Store the remaining stock in a new column.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Now remove the Remaining stock column and reorder your table as you like. IS that possible in your data model?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Peter&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Feb 2018 11:05:01 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2018-02-16T11:05:01Z</dc:date>
    <item>
      <title>Use Peek/Previous from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36217#M609610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 diffferent tables which i &lt;STRONG&gt;cannot&lt;/STRONG&gt; join into one table due to my data structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="113"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl67" colspan="2" height="21" width="113"&gt;Table1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="21" style="border-top: none;"&gt;Item&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Units&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;D&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;E&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="252"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl67" colspan="4" height="21" width="252"&gt;Table2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="21"&gt;OrderDate&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;Order&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;Item&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;"&gt;Req&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;DEF&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;GHI&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 302px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl68" colspan="5" height="20" width="302"&gt;Req O/P:&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="21" style="border-top: none;"&gt;OrderDate&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Order&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Item&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;Req&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;Flag&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;&lt;SPAN style="color: #993300;"&gt;2/15/2018&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #993300;"&gt;DEF&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #993300;"&gt;A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #993300;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #993300;"&gt;N&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-top: none;"&gt;&lt;SPAN style="color: #993300;"&gt;2/15/2018&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #993300;"&gt;GHI&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #993300;"&gt;C&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #993300;"&gt;30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;&lt;P&gt;&lt;SPAN style="color: #993300;"&gt;Y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to start allocating my units by oldest order date first.&lt;/P&gt;&lt;P&gt;Once allocated, i wanna subtract the allocated units from units it doesnot get allocated in a duplicate way.&lt;/P&gt;&lt;P&gt;Once the units cannot fill 'req' field, 'N' will populate, else 'Y'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help??&lt;/P&gt;&lt;P&gt;Please note that i just want to lookup the value from Table1, but not join it.&lt;/P&gt;&lt;P&gt;Wanted to do this in script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is highly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 03:45:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36217#M609610</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2018-02-16T03:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Use Peek/Previous from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36218#M609611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, if the data was something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; width: 252px;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl67" colspan="4" height="21" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;" width="252"&gt;Table2&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl65" height="21" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;OrderDate&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Order&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Item&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Req&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #ff0000;"&gt;5&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;DEF&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #ff0000;"&gt;5&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;GHI&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output would have been this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl65" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;OrderDate&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Order&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Item&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Req&lt;/TD&gt;&lt;TD class="xl67" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Flag&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;10&lt;/TD&gt;&lt;TD class="xl67" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;20&lt;/TD&gt;&lt;TD class="xl67" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #993300;"&gt;2/15/2018&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #993300;"&gt;DEF&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #993300;"&gt;A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #993300;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl67" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #ff0000;"&gt;Y&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #993300;"&gt;2/15/2018&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #993300;"&gt;GHI&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #993300;"&gt;C&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #993300;"&gt;30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl67" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #993300;"&gt;Y&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, what would be the output for a scenario like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; width: 252px;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl67" colspan="4" height="21" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;" width="252"&gt;Table2&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl65" height="21" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;OrderDate&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Order&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Item&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Req&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #ff0000;"&gt;5&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;DEF&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #ff0000;"&gt;8&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;GHI&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 10:51:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36218#M609611</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-16T10:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Use Peek/Previous from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36219#M609612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I have understood the problem, what is required is, if total number of units of item in table 2 exceeds that mentioned in table 1 then flag should be 'N' . If the number of units of item in table 2 is less than that in table 1 , then the flag should be 'Y'.&amp;nbsp; And this should be sorted as per the date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try out the following logic :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;//Assuming one to one mapping for units&lt;/P&gt;&lt;P&gt;Table1 :&lt;/P&gt;&lt;P&gt;Mapping Load * Inline&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 113px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="21" style="border-width: medium 0px 0px; border-style: none solid solid; border-color: currentColor black black;"&gt;Item,&lt;/TD&gt;&lt;TD class="xl65" style="border-width: medium 0px 0px medium; border-style: none solid solid none; border-color: currentColor black black currentColor;"&gt;Units&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-width: medium 0px 0px; border-style: none solid solid; border-color: currentColor black black;"&gt;A,&lt;/TD&gt;&lt;TD class="xl66" style="border-width: medium 0px 0px medium; border-style: none solid solid none; border-color: currentColor black black currentColor;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-width: medium 0px 0px; border-style: none solid solid; border-color: currentColor black black;"&gt;B,&lt;/TD&gt;&lt;TD class="xl66" style="border-width: medium 0px 0px medium; border-style: none solid solid none; border-color: currentColor black black currentColor;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-width: medium 0px 0px; border-style: none solid solid; border-color: currentColor black black;"&gt;C,&lt;/TD&gt;&lt;TD class="xl66" style="border-width: medium 0px 0px medium; border-style: none solid solid none; border-color: currentColor black black currentColor;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-width: medium 0px 0px; border-style: none solid solid; border-color: currentColor black black;"&gt;D,&lt;/TD&gt;&lt;TD class="xl66" style="border-width: medium 0px 0px medium; border-style: none solid solid none; border-color: currentColor black black currentColor;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="21" style="border-width: medium 0px 0px; border-style: none solid solid; border-color: currentColor black black;"&gt;E,&lt;/TD&gt;&lt;TD class="xl66" style="border-width: medium 0px 0px medium; border-style: none solid solid none; border-color: currentColor black black currentColor;"&gt;50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Req O/P]:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Order,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Item,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Req ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( Item = Peek(Item)&amp;nbsp; , Peek(Req_Cumm) +&amp;nbsp; Req ,&amp;nbsp; Req ) as Req_Cumm,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if( Req_Cumm&amp;nbsp; &amp;gt;&amp;nbsp; ApplyMap('Table1', Item, 0), 'N', 'Y')&amp;nbsp;&amp;nbsp; as Flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Table2&amp;nbsp; Order By OrderDate, Order, Item ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vikraant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 10:58:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36219#M609612</guid>
      <dc:creator>vikraant</dc:creator>
      <dc:date>2018-02-16T10:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Use Peek/Previous from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36220#M609613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Order Fulfillment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joining your stock to those Order rows is pretty much the easiest way to get to your end-result. Keep in mind that in the end such a solution wouldn't force you to keep any superfluous fields in your order table. Just the Flag field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As possible methodology:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a mapping table that maps each product ot its stock level.&lt;/LI&gt;&lt;LI&gt;Take your orders table, and order it by product and date. Use an ORDER BY clause when performing the next two steps. ORDER BY happens before anything else.&lt;/LI&gt;&lt;LI&gt;At the same time, whenever the previous product is different from the current one, lookup the initial stock value using the mapping table and set Flag=Y if you have enough stock and Flag=N if the initial stock cannot fulfill the requested amount. Store the remaining stock in a new column.&lt;/LI&gt;&lt;LI&gt;If the current product is the same as the previous product, compare the remaining stock of the previous row to the ordered amount. S&lt;SPAN style="font-size: 13.3333px;"&gt;et Flag=Y if you still have enough stock and Flag=N if the previous stock cannot fulfill the requested amount. Store the remaining stock in a new column.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Now remove the Remaining stock column and reorder your table as you like. IS that possible in your data model?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Peter&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 11:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36220#M609613</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-02-16T11:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Use Peek/Previous from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36221#M609614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your output example is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For the scenario you have provided, output will be as follows:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl67" colspan="5" height="21" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;" width="252"&gt;Table2&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl65" height="21" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;OrderDate&lt;/TD&gt;&lt;TD class="xl65" height="21" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Order&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Item&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Req&amp;nbsp; Flag&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #ff0000;"&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;DEF&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #ff0000;"&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;GHI&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 14:45:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36221#M609614</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2018-02-16T14:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Use Peek/Previous from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36222#M609615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another interesting variation on Sunny's example. What would be the Flag value for the last line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="border: 0px; font-weight: inherit; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl67" colspan="4" height="21" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;" width="252"&gt;Table2&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl65" height="21" style="padding-right: 4px; padding-left: 4px; border: 0px solid black; font-style: inherit; font-family: inherit;"&gt;OrderDate&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Order&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Item&lt;/TD&gt;&lt;TD class="xl65" style="padding-right: 4px; padding-left: 4px; border-top: 0 solid black; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;Req&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #ff0000;"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/14/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;ABC&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;DEF&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #ff0000;"&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/15/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;GHI&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="21" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: 0 solid black; font-style: inherit; font-family: inherit;"&gt;2/16/2018&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;XYZ&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="padding-right: 4px; padding-left: 4px; border-top: none; border-right: 0 solid black; border-bottom: 0 solid black; border-left: none; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the Req=8 line taking those last 5 pieces (partial delivery)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 15:26:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36222#M609615</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-02-16T15:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Use Peek/Previous from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36223#M609616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes sir.&lt;/P&gt;&lt;P&gt;As it now has only 5 units left after allocating units to first order, it says N for another order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 15:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36223#M609616</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2018-02-16T15:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Use Peek/Previous from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36224#M609617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Use Peek-Previous from 2 tables thread291651.jpg" class="jive-image image-1" src="/legacyfs/online/193636_Use Peek-Previous from 2 tables thread291651.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I'm posting this at the end, because this example does what the previous post tries to explain)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 15:54:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-Peek-Previous-from-2-tables/m-p/36224#M609617</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-02-16T15:54:38Z</dc:date>
    </item>
  </channel>
</rss>

