<?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 Peek and nulls in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Peek-and-nulls/m-p/1704977#M54043</link>
    <description>&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;I'm looking for input on how to be write code around the peek function to to grab the last not null value. For ID = 3, peek(TimeStamp) will be null. But in this case, I want the peek to take TimeStamp from ID = 1,e.g. the next most recent no null value.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Set NullInterpret = '';&lt;/P&gt;&lt;P&gt;A:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[&lt;BR /&gt;TimeStamp, ID&lt;BR /&gt;5/25/2020 5:27:47 PM,1&lt;BR /&gt;,2&lt;BR /&gt;5/25/2020 6:27:47 PM,3&lt;BR /&gt;5/25/2020 8:27:47 PM,4&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Q:&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;date(TimeStamp),&lt;BR /&gt;num(date(TimeStamp)),&lt;BR /&gt;TimeStamp,&lt;BR /&gt;peek(TimeStamp,-1)&lt;BR /&gt;Resident A;&lt;/P&gt;&lt;P&gt;drop Table A;&lt;/P&gt;</description>
    <pubDate>Mon, 25 May 2020 22:04:39 GMT</pubDate>
    <dc:creator>ManuelLindekeit</dc:creator>
    <dc:date>2020-05-25T22:04:39Z</dc:date>
    <item>
      <title>Peek and nulls</title>
      <link>https://community.qlik.com/t5/App-Development/Peek-and-nulls/m-p/1704977#M54043</link>
      <description>&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;I'm looking for input on how to be write code around the peek function to to grab the last not null value. For ID = 3, peek(TimeStamp) will be null. But in this case, I want the peek to take TimeStamp from ID = 1,e.g. the next most recent no null value.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Set NullInterpret = '';&lt;/P&gt;&lt;P&gt;A:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[&lt;BR /&gt;TimeStamp, ID&lt;BR /&gt;5/25/2020 5:27:47 PM,1&lt;BR /&gt;,2&lt;BR /&gt;5/25/2020 6:27:47 PM,3&lt;BR /&gt;5/25/2020 8:27:47 PM,4&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Q:&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;date(TimeStamp),&lt;BR /&gt;num(date(TimeStamp)),&lt;BR /&gt;TimeStamp,&lt;BR /&gt;peek(TimeStamp,-1)&lt;BR /&gt;Resident A;&lt;/P&gt;&lt;P&gt;drop Table A;&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 22:04:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Peek-and-nulls/m-p/1704977#M54043</guid>
      <dc:creator>ManuelLindekeit</dc:creator>
      <dc:date>2020-05-25T22:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and nulls</title>
      <link>https://community.qlik.com/t5/App-Development/Peek-and-nulls/m-p/1705013#M54047</link>
      <description>&lt;P&gt;Try this for Q:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Q:&lt;BR /&gt;Load *,&lt;BR /&gt;Date#(Subfield(NewTimeStamp, ' ', 1),'M/DD/YYYY') as DateString;&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;TimeStamp,&lt;BR /&gt;If(IsNull(TimeStamp), Peek(NewTimeStamp), TimeStamp) as NewTimeStamp&lt;BR /&gt;Resident A;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 04:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Peek-and-nulls/m-p/1705013#M54047</guid>
      <dc:creator>Lisa_P</dc:creator>
      <dc:date>2020-05-26T04:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and nulls</title>
      <link>https://community.qlik.com/t5/App-Development/Peek-and-nulls/m-p/1705245#M54068</link>
      <description>&lt;P&gt;Thanks Lisa. Follow up on peek()'s behavior. When I first looked at the IF statement, I thought it would work if the last loaded row is null but not if the two last loaded rows are null. I thought so because peek() assumes -1 if the second argument is left out. Why does the peek pick the last non-null timestamp instead of just peek(timestamp,-1)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 14:21:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Peek-and-nulls/m-p/1705245#M54068</guid>
      <dc:creator>ManuelLindekeit</dc:creator>
      <dc:date>2020-05-26T14:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Peek and nulls</title>
      <link>https://community.qlik.com/t5/App-Development/Peek-and-nulls/m-p/1705246#M54069</link>
      <description>Also, I see that you used Peek(NewTimeStamp) on a line where you were&lt;BR /&gt;creating NewTiemStamp. I would have thought a preceding load would have&lt;BR /&gt;been needed. That's cool. Is that because peek() evaluates on internal&lt;BR /&gt;table, rather than source table?&lt;BR /&gt;</description>
      <pubDate>Tue, 26 May 2020 14:27:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Peek-and-nulls/m-p/1705246#M54069</guid>
      <dc:creator>ManuelLindekeit</dc:creator>
      <dc:date>2020-05-26T14:27:30Z</dc:date>
    </item>
  </channel>
</rss>

