<?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: Using peek to accumulate - but not working... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410637#M699940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok with your feedback I decided to go back and look at how I was constructing my tables.&amp;nbsp; Turns out I had it wrong so I went back and adjusted.&amp;nbsp; My &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt; numsum ( Amount, Peek( 'Balance') ) as Balance&lt;/SPAN&gt; is now working &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks for making me question my script again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Dec 2012 16:48:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-06T16:48:20Z</dc:date>
    <item>
      <title>Using peek to accumulate - but not working...</title>
      <link>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410633#M699936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have built a facts table the following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Load &lt;STRONG&gt;Facts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;leftjoin (&lt;STRONG&gt;Facts&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Load &lt;STRONG&gt;ExtraTable1&lt;/STRONG&gt; //includes the field Amount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Load &lt;STRONG&gt;Facts2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;leftjoin (&lt;STRONG&gt;Facts2&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Load &lt;STRONG&gt;ExtraTable&lt;/STRONG&gt;2 //includes the field Amount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Concatenate (&lt;STRONG&gt;Facts&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Load&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; numsum ( Amount, Peek( 'Balance') ) as Balance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Resident &lt;STRONG&gt;Facts2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I look at the resultant table in an App I get the following results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 50%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Row No&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Balance&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2068.5&lt;/TD&gt;&lt;TD&gt;2068.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;-456&lt;/TD&gt;&lt;TD&gt;-456&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;236&lt;/TD&gt;&lt;TD&gt;236&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;452.2&lt;/TD&gt;&lt;TD&gt;452.2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;7897&lt;/TD&gt;&lt;TD&gt;7897&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;522&lt;/TD&gt;&lt;TD&gt;522&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;-789&lt;/TD&gt;&lt;TD&gt;-789&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for some reason the script isn't adding together Amount with the previous Balance value.&amp;nbsp; Can anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 17:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410633#M699936</guid>
      <dc:creator />
      <dc:date>2012-12-05T17:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using peek to accumulate - but not working...</title>
      <link>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410634#M699937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works here. See attached example. The only thing I can think of is that there's a typo in the peek function so the name isn't exactly the same as the fieldname at then end of the line. Like &lt;STRONG&gt;numsum ( Amount, Peek( 'Bal&lt;SPAN style="color: #ff0000;"&gt;e&lt;/SPAN&gt;nce') ) as Balance &lt;/STRONG&gt;or &lt;STRONG&gt;numsum ( Amount, Peek( '&lt;SPAN style="color: #ff0000;"&gt;b&lt;/SPAN&gt;alance') ) as Balance&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 18:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410634#M699937</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-12-05T18:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using peek to accumulate - but not working...</title>
      <link>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410635#M699938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.&amp;nbsp; I can't check your code as I'm having issues with our Server licence.&amp;nbsp; But one thing's for sure there is no typo in my script.&amp;nbsp; My thoughts are the issue is around the way I have constructed the Facts table; would using the Peek function in a resident table be a problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 14:58:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410635#M699938</guid>
      <dc:creator />
      <dc:date>2012-12-06T14:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using peek to accumulate - but not working...</title>
      <link>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410636#M699939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A resident table will work fine with peek (see code below). I still think the peek function isn't using the right field name. QV is case sensitive so &lt;STRONG&gt;balance &lt;/STRONG&gt;is not the same as &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;B&lt;/SPAN&gt;alance&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Row No&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 2068.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; -456&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; 236&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; 452.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp; 7897&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp; 522&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp; -789&lt;/P&gt;&lt;P&gt;](delimiter is '\t');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;load *, numsum(Amount, peek('Balance')) as Balance&lt;/P&gt;&lt;P&gt;Resident Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above gives the same result as this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;load *, numsum(Amount,peek('Balance')) as Balance;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Row No&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 2068.5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; -456&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; 236&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; 452.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp; 7897&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp; 522&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp; -789&lt;/P&gt;&lt;P&gt;](delimiter is '\t');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 15:22:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410636#M699939</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-12-06T15:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using peek to accumulate - but not working...</title>
      <link>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410637#M699940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok with your feedback I decided to go back and look at how I was constructing my tables.&amp;nbsp; Turns out I had it wrong so I went back and adjusted.&amp;nbsp; My &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt; numsum ( Amount, Peek( 'Balance') ) as Balance&lt;/SPAN&gt; is now working &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks for making me question my script again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 16:48:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-peek-to-accumulate-but-not-working/m-p/410637#M699940</guid>
      <dc:creator />
      <dc:date>2012-12-06T16:48:20Z</dc:date>
    </item>
  </channel>
</rss>

