<?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: Peek Not Behaving as Expected in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-Not-Behaving-as-Expected/m-p/1677146#M593347</link>
    <description>&lt;P&gt;Try it in this way:&lt;/P&gt;&lt;P&gt;Test:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;RowNumber, Category, Affirmed&lt;BR /&gt;1, A, Yes&lt;BR /&gt;2, A&lt;BR /&gt;3, A, No&lt;BR /&gt;4, B&lt;BR /&gt;5, B, Yes&lt;BR /&gt;6, B, No&lt;BR /&gt;7, C&lt;BR /&gt;8, C, Yes&lt;BR /&gt;9, C, No&lt;BR /&gt;10, C&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;// NoConcatenate&lt;BR /&gt;Test2:&lt;BR /&gt;LOAD&lt;BR /&gt;RowNumber &lt;STRONG&gt;//, Category&lt;/STRONG&gt;&lt;BR /&gt;Resident Test&lt;BR /&gt;Order By RowNumber ASC;&lt;/P&gt;&lt;P&gt;Left Join (Test2)&lt;BR /&gt;LOAD&lt;BR /&gt;RowNumber, Affirmed, &lt;STRONG&gt;Category&lt;/STRONG&gt;,&lt;BR /&gt;Peek(RowNumber) as PeekRowNumber,&lt;BR /&gt;&lt;STRONG&gt;if(len(trim(Affirmed)) = 0 AND Category = Peek('Category'),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Peek('Affirmed'), Affirmed) as Affirmed_New,&lt;/STRONG&gt;&lt;BR /&gt;Peek(Affirmed) as PeekAffirmed&lt;BR /&gt;Resident Test Order By RowNumber ASC;&lt;/P&gt;&lt;P&gt;Drop Table Test;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2020 15:50:10 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2020-02-19T15:50:10Z</dc:date>
    <item>
      <title>Peek Not Behaving as Expected</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Not-Behaving-as-Expected/m-p/1676828#M593346</link>
      <description>&lt;P&gt;I am having an issue with Peek inside of an IF statement not behaving as expected.&amp;nbsp; Outside of an IF statement Peek works as expected.&amp;nbsp; I've included a simplified example where I am trying to fill in values for the Affirmed field with regards to the Category field.&amp;nbsp; I'm not sure if the Left Join may be having an effect on this.&amp;nbsp; Please see the attached qvw.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:15:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Not-Behaving-as-Expected/m-p/1676828#M593346</guid>
      <dc:creator>bradsiebert</dc:creator>
      <dc:date>2024-11-16T01:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Peek Not Behaving as Expected</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Not-Behaving-as-Expected/m-p/1677146#M593347</link>
      <description>&lt;P&gt;Try it in this way:&lt;/P&gt;&lt;P&gt;Test:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;RowNumber, Category, Affirmed&lt;BR /&gt;1, A, Yes&lt;BR /&gt;2, A&lt;BR /&gt;3, A, No&lt;BR /&gt;4, B&lt;BR /&gt;5, B, Yes&lt;BR /&gt;6, B, No&lt;BR /&gt;7, C&lt;BR /&gt;8, C, Yes&lt;BR /&gt;9, C, No&lt;BR /&gt;10, C&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;// NoConcatenate&lt;BR /&gt;Test2:&lt;BR /&gt;LOAD&lt;BR /&gt;RowNumber &lt;STRONG&gt;//, Category&lt;/STRONG&gt;&lt;BR /&gt;Resident Test&lt;BR /&gt;Order By RowNumber ASC;&lt;/P&gt;&lt;P&gt;Left Join (Test2)&lt;BR /&gt;LOAD&lt;BR /&gt;RowNumber, Affirmed, &lt;STRONG&gt;Category&lt;/STRONG&gt;,&lt;BR /&gt;Peek(RowNumber) as PeekRowNumber,&lt;BR /&gt;&lt;STRONG&gt;if(len(trim(Affirmed)) = 0 AND Category = Peek('Category'),&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Peek('Affirmed'), Affirmed) as Affirmed_New,&lt;/STRONG&gt;&lt;BR /&gt;Peek(Affirmed) as PeekAffirmed&lt;BR /&gt;Resident Test Order By RowNumber ASC;&lt;/P&gt;&lt;P&gt;Drop Table Test;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 15:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Not-Behaving-as-Expected/m-p/1677146#M593347</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-02-19T15:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Peek Not Behaving as Expected</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Not-Behaving-as-Expected/m-p/1677153#M593348</link>
      <description>&lt;P&gt;That worked, thanks!&amp;nbsp; Is there a rule for when a field inside of Peek needs quotes versus when it does not?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 15:59:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Not-Behaving-as-Expected/m-p/1677153#M593348</guid>
      <dc:creator>bradsiebert</dc:creator>
      <dc:date>2020-02-19T15:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Peek Not Behaving as Expected</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Not-Behaving-as-Expected/m-p/1677168#M593349</link>
      <description>&lt;P&gt;Fields in peek() should be always wrapped with single-quotes because it's not a reference to a field within the current load like previous() would do else to a record in a table (which might be also the current one). All functions which query the tables like fieldvalue() or tablename() require strings for the none numeric parameters.&lt;/P&gt;&lt;P&gt;Does it nevertheless worked in some cases it caused from the fact that Qlik interprets them as strings but as far as fieldnames contain a space or any kind special chars it would fail without the quoting.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 16:29:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Not-Behaving-as-Expected/m-p/1677168#M593349</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-02-19T16:29:47Z</dc:date>
    </item>
  </channel>
</rss>

