<?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: Keep value through rows in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Keep-value-through-rows/m-p/1197129#M628583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You logic isn't quite clear to me but it sounds that you need to check the previous records which could be done in a sorted load with &lt;A href="https://community.qlik.com/docs/DOC-9314"&gt;Peek() or Previous() ?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Oct 2016 10:30:33 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-10-01T10:30:33Z</dc:date>
    <item>
      <title>Keep value through rows</title>
      <link>https://community.qlik.com/t5/QlikView/Keep-value-through-rows/m-p/1197128#M628582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to find a way to keep a value through multiple rows of information in script. I tried firstvalue &amp;amp; lastvalue, but it doesnt help because i potentially have duplicates (that should be there). I have a scenario where a person works on a reference, and can choose to close and work on this item about 2 hours later, however someone else can also work on this item as well. I need to keep the first time he worked on this item and stopped, and thereafter start a new calculation when he works on it again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="ex.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/139335_ex.png" style="height: 341px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;I need to carry the start value till the end as per column 'start' in the example above? Note person B can start and end the reference twice in a day, but there will be a other references in between (so he wont start the item a second time, without references in between). I believe peek could work, but im struggling to keep a value through all rows as the number of rows vary...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would really appreciate the assistance on how to achieve this in script..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 21:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Keep-value-through-rows/m-p/1197128#M628582</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-30T21:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Keep value through rows</title>
      <link>https://community.qlik.com/t5/QlikView/Keep-value-through-rows/m-p/1197129#M628583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You logic isn't quite clear to me but it sounds that you need to check the previous records which could be done in a sorted load with &lt;A href="https://community.qlik.com/docs/DOC-9314"&gt;Peek() or Previous() ?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 10:30:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Keep-value-through-rows/m-p/1197129#M628583</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-10-01T10:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Keep value through rows</title>
      <link>https://community.qlik.com/t5/QlikView/Keep-value-through-rows/m-p/1197130#M628584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this should works; the condition in bold check same reference, same person, not more thsan 2 hours &lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" height="267" src="https://community.qlik.com/legacyfs/online/139364_1.png" style="height: 266.963px; width: 458px;" width="458" /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Z:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load * inline [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;reference, create_datetime, datetime, person&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 22/09/2016 08:18:40,A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 22/09/2016 08:18:41,A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 22/09/2016 08:18:50,A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 22/09/2016 08:50:05,A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 22/09/2016 08:53:29,A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 22/09/2016 08:53:40,A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 08:21:38,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 08:21:38,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 08:23:18,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 08:24:38,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 08:24:38,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 08:24:41,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 10:31:53,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 10:31:53,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 10:31:54,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 10:32:06,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 10:33:43,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 10:33:43,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 16/09/2016 10:53:48, 20/09/2016 10:33:48,B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Z1:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NoConcatenate load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(reference=peek('reference') and person=Peek('person') and (datetime - Peek('datetime')) &amp;lt;= 2/24 , peek('start'), datetime)&amp;nbsp; as start&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident Z&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;order by reference, person, datetime;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table Z;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Oct 2016 11:52:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Keep-value-through-rows/m-p/1197130#M628584</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-10-01T11:52:25Z</dc:date>
    </item>
  </channel>
</rss>

