<?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: Preceding load with group by in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847951#M655972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bump.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 09:59:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-05-26T09:59:08Z</dc:date>
    <item>
      <title>Preceding load with group by</title>
      <link>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847950#M655971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using this to create a test Data table :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="color: #993300;"&gt;&lt;STRONG&gt;Data :&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; Date(Date#(Date,'DD-MMM-YYYY')) as Date ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; Site&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;Load *&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;INLINE [&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, Site&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01-May-2015, Site 1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02-May-2015, Site 2&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03-May-2015, Site 2&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 04-May-2015, Site 1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05-May-2015, Site 1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 06-May-2015, Site 2&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 07-May-2015, Site 1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 08-May-2015, Site 1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="color: #993300;"&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/EM&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;I then run this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="color: #993300;"&gt;&lt;STRONG&gt;Temp01 :&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; peek ( Site ) ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; num(if ( Site = peek ( Site ) , peek( [Sub] ) , alt ( peek( [Sub] ) + 1&amp;nbsp; , 1 ) ) ) as [Sub] ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; *&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;resident Data &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;order by Date , Site&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;Temp02 :&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;NoConcatenate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; date(Min(Date)) as [Start Date] ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; date(Max(Date)) as [End Date] ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; Sub ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; only(Site) as Site&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;resident Temp01 &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;group by Sub&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;drop table Temp01 ;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="color: #993300;"&gt;&lt;STRONG&gt;drop table Data ;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this in Temp02 table, which is what I want :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Sub&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Site&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Start Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;End Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Site 1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;01 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;01 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Site 2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;03 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;3&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Site 1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;04 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;05 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;4&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Site 2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;06 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;06 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Site 1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;07 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;08 May 2015&lt;/SPAN&gt;&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;But to eliminate the second resident load I wish to script this in a preceding load, something like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="color: #993300;"&gt;&lt;STRONG&gt;Temp01 :&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; date(Min(Date)) as [Start Date] ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; date(Max(Date)) as [End Date] ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; Sub ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; only(Site) as Site&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;group by Sub&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; peek ( Site ) ,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; num(if ( Site = peek ( Site ) , peek( [Sub] ) , alt ( peek( [Sub] ) + 1&amp;nbsp; , 1 ) ) ) as &lt;SUB&gt; ,&lt;/SUB&gt;&lt;/EM&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;/STRONG&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;&amp;nbsp; *&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;resident Data &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;order by Date , Site&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="color: #993300;"&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM style="color: #993300;"&gt;&lt;STRONG&gt;drop table Data ;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But then I get this output table, which is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Sub&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Site&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Start Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;End Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Site 2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;02 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;06 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Site 1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;01 May 2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff" nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;08 May 2015&lt;/SPAN&gt;&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;Anybody got any idea where it is going adrift ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 05:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847950#M655971</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-26T05:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Preceding load with group by</title>
      <link>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847951#M655972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bump.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 09:59:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847951#M655972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-26T09:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Preceding load with group by</title>
      <link>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847952#M655973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bill, I haven't got a clue. But from my own attempts a few years ago I remember a similar situation that couldn't be explained. I then ran into Qlik support, and after a few WADs I simply gave up on using PRECEDING LOADS (except for the very simple ones) which essentially are nothing more than &lt;SPAN style="font-size: 13.3333330154419px;"&gt;script-text-shortening techniques&lt;/SPAN&gt;. Too much trouble, too unreliable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end, in your case the exact same thing will be happening behind the scenes as in your original script: Resident tables are created to pass data from one PRECEDING LOAD to the next. A GROUP BY and an ORDER BY cannot be performed "on-the-fly"...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did manage to behave (i.e. not comment) when reading this blog post: &lt;A href="https://community.qlik.com/qlik-blogpost/2972"&gt;Preceding Load&lt;/A&gt; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 10:30:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847952#M655973</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-05-26T10:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Preceding load with group by</title>
      <link>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847953#M655974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess that is because the preceding load Group By is also being considered by it's following resident load. And since, the [Sub] field is a calculated field from [Site], the group by is being implemented on Site to give you the output as it comes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 10:31:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847953#M655974</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-05-26T10:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Preceding load with group by</title>
      <link>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847954#M655975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it's a little bit different (or I would describe it a little bit different):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your method to create an incremental number for a Site change is relying on Peek() function to address the un-goruped records, but I believe Peek() will address the records from the ouput table (which are the records that the top most preceding LOAD produces, the grouped records in your case). I think there is no method to address the intermediate records on their way from the bottom to top LOAD statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Peter mentioned - and looking at the reports about preceding LOAD resulting in worse performance - I would also vote for your first script version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;sorry, I've just noticed that this thread is years old, it seemed to just popped up again...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Feb 2017 20:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Preceding-load-with-group-by/m-p/847954#M655975</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-05T20:45:27Z</dc:date>
    </item>
  </channel>
</rss>

