<?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: Incorrect Value with Peek in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286922#M402853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So if you use peek, you need to use StartDate which is a Field in Final Table.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StartDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )-1, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('2099-12-31')),'DD/MM/YYYY')) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;EndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Mar 2017 13:11:43 GMT</pubDate>
    <dc:creator>stabben23</dc:creator>
    <dc:date>2017-03-01T13:11:43Z</dc:date>
    <item>
      <title>Incorrect Value with Peek</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286914#M402845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a set of data as mentioned below even if the Id "1" is present for different month is always give &lt;SPAN style="font-size: 13.3333px;"&gt;2099-12-31&lt;/SPAN&gt; as End date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;load ID , MonthName(Timestamp(timestamp#(Date,'M/D/YYYY h:mm:ss[.fff]'),'M/D/YYYY h:mm:ss[.fff]')) as Month,&lt;/P&gt;&lt;P&gt;(Timestamp(timestamp#(Date,'M/D/YYYY h:mm:ss[.fff]'),'M/D/YYYY h:mm:ss[.fff]')) as Date;&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;ID, Date&lt;/P&gt;&lt;P&gt;1,12/30/2016 16:00:04&lt;/P&gt;&lt;P&gt;1,1/31/2017 16:00:04&lt;/P&gt;&lt;P&gt;1,2/28/2017 16:00:05&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;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join (Temp)&lt;/P&gt;&lt;P&gt;load *,date(monthstart(maxdate),'DD/MM/YYYY') as MonthStart;&lt;/P&gt;&lt;P&gt;load ID ,(max(Date)) as maxdate&lt;/P&gt;&lt;P&gt;Resident Temp&amp;nbsp; GROUP by ID,Month&lt;/P&gt;&lt;P&gt;Order by ID, Date&amp;nbsp; desc;&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;&lt;P&gt;Temp2:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;load * resident Temp order by ID ,Date desc;&lt;/P&gt;&lt;P&gt;drop table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;load ID,&lt;/P&gt;&lt;P&gt;Floor(MonthStart) as StartDate,&lt;/P&gt;&lt;P&gt;Floor(date(If(ID = Peek(ID), Peek(MonthStart)-1,Floor('2099-12-31')),'DD/MM/YYYY')) AS EndDate&lt;/P&gt;&lt;P&gt;Resident Temp2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Temp2;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 11:17:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286914#M402845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-01T11:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Value with Peek</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286915#M402846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your expected output here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 11:29:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286915#M402846</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-01T11:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Value with Peek</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286916#M402847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;rest of dates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 11:37:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286916#M402847</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-01T11:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Value with Peek</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286917#M402848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is expected output?&lt;/P&gt;&lt;P&gt;Is it previous value you are trying to find With peek?&lt;/P&gt;&lt;P&gt;Maybe this help you?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthStart&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-1,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('2099-12-31')),'DD/MM/YYYY')) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;EndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 11:42:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286917#M402848</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2017-03-01T11:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Value with Peek</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286918#M402849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you mean. Can you list out the output?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 11:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286918#M402849</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-01T11:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Value with Peek</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286919#M402850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u plz explain why previous gives the correct result instead of peek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 12:21:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286919#M402850</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-01T12:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Value with Peek</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286920#M402851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont know if it gives you correct result, I dont know what output you expect. But read this.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-9314"&gt;Peek() or Previous() ?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 12:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286920#M402851</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2017-03-01T12:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Value with Peek</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286921#M402852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peek() will address the output table records -- and MonthStart field is not part of your 'Final' table output records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 12:40:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286921#M402852</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-03-01T12:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Value with Peek</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286922#M402853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So if you use peek, you need to use StartDate which is a Field in Final Table.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;StartDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )-1, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Floor&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('2099-12-31')),'DD/MM/YYYY')) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;EndDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 13:11:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-Value-with-Peek/m-p/1286922#M402853</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2017-03-01T13:11:43Z</dc:date>
    </item>
  </channel>
</rss>

