<?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: doing same thing but getting different results from preceding load and resident load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/doing-same-thing-but-getting-different-results-from-preceding/m-p/859814#M301040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QlikRajan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that's due to your use of the PEEK() function, which will address records from the output table, which you alter when using a preceding load with where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the Help, difference between Peek() and Previous() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&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;&lt;/P&gt;&lt;P&gt;Try along these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14338849112808558 jive_text_macro" jivemacro_uid="_14338849112808558" modifiedtitle="true"&gt;
&lt;P&gt;[tmpAssortments3]:&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;Where TmpFlag=1;&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;if (%SkuStoreSeasonKey= Previous(%SkuStoreSeasonKey) and [Allocated Date] &amp;lt;&amp;gt; Previous([Allocated Date]) and [Allocated Date] &amp;lt;&amp;gt; Previous(Previous([Allocated Date])), 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,if(%SkuStoreKey= Previous(%SkuStoreKey) and %SkuStoreSeasonKey &amp;lt;&amp;gt; Previous(%SkuStoreSeasonKey) and [Allocated Date] &amp;lt;&amp;gt; Previous([Allocated Date])&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; and [Allocated Date] = Previous(Previous([Allocated Date])) and [Allocation Deadline Date]&amp;lt;&amp;gt; Previous ([Allocation Deadline Date]), 3, 1)) as TmpFlag //eliminate many to many relatioship&lt;/P&gt;
&lt;P&gt;Resident [tmpAssortments2]&lt;/P&gt;
&lt;P&gt;Where Count=4&lt;/P&gt;
&lt;P&gt;order by %SkuStoreKey, %SkuStoreSeasonKey,&amp;nbsp; [Allocated Date], [Allocation Deadline Date];&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2015 21:18:33 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-06-09T21:18:33Z</dc:date>
    <item>
      <title>doing same thing but getting different results from preceding load and resident load</title>
      <link>https://community.qlik.com/t5/QlikView/doing-same-thing-but-getting-different-results-from-preceding/m-p/859812#M301038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;hi experts!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;when I do prceding load&amp;nbsp;&amp;nbsp; LOAD *, Where TmpFlag=1; I get number of rows 19 but when I do resident load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[tmpAssortments4]:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;Resident [tmpAssortments3]&lt;/P&gt;&lt;P&gt;Where TmpFlag=1;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;DROP Table [tmpAssortments3];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;I get no of rows 22, that is correct figure. Any idea why I am losing some rows in preceding load. app/data attached.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 20:43:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/doing-same-thing-but-getting-different-results-from-preceding/m-p/859812#M301038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-09T20:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: doing same thing but getting different results from preceding load and resident load</title>
      <link>https://community.qlik.com/t5/QlikView/doing-same-thing-but-getting-different-results-from-preceding/m-p/859813#M301039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure that it is not only the log message that is fooling you? A preceding load will report the rows from the load at the bottom so possibly before the where filter. A resident load will always report what it is doing...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 21:09:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/doing-same-thing-but-getting-different-results-from-preceding/m-p/859813#M301039</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-06-09T21:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: doing same thing but getting different results from preceding load and resident load</title>
      <link>https://community.qlik.com/t5/QlikView/doing-same-thing-but-getting-different-results-from-preceding/m-p/859814#M301040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;QlikRajan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that's due to your use of the PEEK() function, which will address records from the output table, which you alter when using a preceding load with where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the Help, difference between Peek() and Previous() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&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;&lt;/P&gt;&lt;P&gt;Try along these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14338849112808558 jive_text_macro" jivemacro_uid="_14338849112808558" modifiedtitle="true"&gt;
&lt;P&gt;[tmpAssortments3]:&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;Where TmpFlag=1;&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;if (%SkuStoreSeasonKey= Previous(%SkuStoreSeasonKey) and [Allocated Date] &amp;lt;&amp;gt; Previous([Allocated Date]) and [Allocated Date] &amp;lt;&amp;gt; Previous(Previous([Allocated Date])), 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,if(%SkuStoreKey= Previous(%SkuStoreKey) and %SkuStoreSeasonKey &amp;lt;&amp;gt; Previous(%SkuStoreSeasonKey) and [Allocated Date] &amp;lt;&amp;gt; Previous([Allocated Date])&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; and [Allocated Date] = Previous(Previous([Allocated Date])) and [Allocation Deadline Date]&amp;lt;&amp;gt; Previous ([Allocation Deadline Date]), 3, 1)) as TmpFlag //eliminate many to many relatioship&lt;/P&gt;
&lt;P&gt;Resident [tmpAssortments2]&lt;/P&gt;
&lt;P&gt;Where Count=4&lt;/P&gt;
&lt;P&gt;order by %SkuStoreKey, %SkuStoreSeasonKey,&amp;nbsp; [Allocated Date], [Allocation Deadline Date];&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 21:18:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/doing-same-thing-but-getting-different-results-from-preceding/m-p/859814#M301040</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-09T21:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: doing same thing but getting different results from preceding load and resident load</title>
      <link>https://community.qlik.com/t5/QlikView/doing-same-thing-but-getting-different-results-from-preceding/m-p/859815#M301041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Stefan! It really helped &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 22:01:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/doing-same-thing-but-getting-different-results-from-preceding/m-p/859815#M301041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-09T22:01:28Z</dc:date>
    </item>
  </channel>
</rss>

