<?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 Finding First and Last Records in a group in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317904#M1188835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; use peek as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peek('Columnname',-1,'tablename ') for last recard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peek('Columnname',0,'tablename ') for last recard for first record&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Sep 2011 08:16:52 GMT</pubDate>
    <dc:creator>SunilChauhan</dc:creator>
    <dc:date>2011-09-02T08:16:52Z</dc:date>
    <item>
      <title>Finding First and Last Records in a group</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317901#M1188832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have data that has an ID, a Stage and a Date.&lt;/P&gt;&lt;P&gt;I need to calculate the days for each ID between the Stages.&lt;/P&gt;&lt;P&gt;The data is sorted into the fields and I need to have code to identify the first date in an ID (Lead) and track the date when the Stage changes and then calculate the days difference (which should be a problem).&lt;/P&gt;&lt;P&gt;The difficulty is getting the right functions to access the first and last record in a group.&lt;/P&gt;&lt;P&gt;Any help is gladly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lindab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 16:26:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317901#M1188832</guid>
      <dc:creator />
      <dc:date>2011-09-01T16:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Finding First and Last Records in a group</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317902#M1188833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Stage, ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;date(min(Date)) as StartDate,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;date(max(Date)) as EndDate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RESIDENT mydata&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;GROUP BY Stage, ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2011 21:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317902#M1188833</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-09-01T21:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Finding First and Last Records in a group</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317903#M1188834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you - i will try your suggestion today and report back.&lt;/P&gt;&lt;P&gt;Much appreciated.&lt;/P&gt;&lt;P&gt;Linda &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-original message-&lt;/P&gt;&lt;P&gt;Subject: &lt;A href="New to QlikView"&gt;&lt;/A&gt; - Re: Finding First and Last Records in a group&lt;/P&gt;&lt;P&gt;From: Rob Wunderlich &amp;lt;qliktech@sgaur.hosted.jivesoftware.com&amp;gt;&lt;/P&gt;&lt;P&gt;Date: 01/09/2011 11:06 pm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob Wunderlich &lt;A href="http://community.qlik.com/people/robwunderlich"&gt;&lt;/A&gt; created the discussion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Re: Finding First and Last Records in a group"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To view the discussion, visit: http://community.qlik.com/message/145942#145942&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 03:05:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317903#M1188834</guid>
      <dc:creator />
      <dc:date>2011-09-02T03:05:06Z</dc:date>
    </item>
    <item>
      <title>Finding First and Last Records in a group</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317904#M1188835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; use peek as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peek('Columnname',-1,'tablename ') for last recard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;peek('Columnname',0,'tablename ') for last recard for first record&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 08:16:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317904#M1188835</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-09-02T08:16:52Z</dc:date>
    </item>
    <item>
      <title>Finding First and Last Records in a group</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317905#M1188836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt; Thank you so much for your help. Greatly appreciated.&lt;/P&gt;&lt;P&gt;Linda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Sep 2011 07:49:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-First-and-Last-Records-in-a-group/m-p/317905#M1188836</guid>
      <dc:creator />
      <dc:date>2011-09-03T07:49:41Z</dc:date>
    </item>
  </channel>
</rss>

