<?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: In Script select a date filtered on another date field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212637#M876781</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Thanks for the help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m trying to build TempTable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to filter the Start Date field down to just one Last Start Date for each Person Number. This can go in TempTable, or a new table if necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have the script below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Headcount:&lt;/P&gt;&lt;P&gt;LOAD ,&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tempTable:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;       ,&lt;/P&gt;&lt;P&gt;       Max() as ,&lt;/P&gt;&lt;P&gt;Min() Where ( &amp;gt; Max()) as    // This does not work.&lt;/P&gt;&lt;P&gt;Resident Headcount&lt;/P&gt;&lt;P&gt;Where  &amp;lt;= Today(0)&lt;/P&gt;&lt;P&gt;Group By ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2016 09:17:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-10-25T09:17:23Z</dc:date>
    <item>
      <title>In Script select a date filtered on another date field</title>
      <link>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212635#M876779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, hopefully someone can help me with this one!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Headcount table of employment records with gaps. I want to identify the first Start Date following the last Leaving Date&lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have built a TempTable capturing each Person Number and their Last Leaving Date. I want to Join to this, or Lookup as I load it, the Start Date that follows the Last Leaving Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;Min(Start Date) Where (Start Date &amp;gt; Leaving Date)&amp;nbsp; - to give the result in bold below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions? Thanks for the help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Headcount:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="168" style="width: 337px; height: 144px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="text-align: center;" width="97"&gt;Person Number&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none; text-align: center;" width="69"&gt;Start Date&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none; text-align: center;" width="80"&gt;Leaving Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; text-align: center;" width="97"&gt;1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; text-align: center;" width="69"&gt;04/07/2011&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; text-align: center;" width="80"&gt;24/12/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; text-align: center;" width="97"&gt;1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; text-align: center;" width="69"&gt;29/06/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center;" width="80"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; text-align: center;" width="97"&gt;1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; text-align: center;" width="69"&gt;29/07/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center;" width="80"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="text-align: center;"&gt;2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; text-align: center;" width="69"&gt;04/07/2011&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; text-align: center;" width="80"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="text-align: center;"&gt;2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; text-align: center;" width="69"&gt;29/06/2015&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; text-align: center;" width="80"&gt;31/07/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="text-align: center;"&gt;2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; text-align: center;" width="69"&gt;01/09/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center;" width="80"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempTable:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="168" style="width: 337px; height: 144px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="text-align: center;" width="97"&gt;Person Number&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none; text-align: center;" width="69"&gt;Last Leaving Date&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none; text-align: center;" width="80"&gt;&lt;EM&gt;&lt;STRONG&gt;Last Start Date&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; text-align: center;" width="97"&gt;1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; text-align: center;" width="69"&gt;24/12/2013&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; text-align: center;" width="80"&gt;&lt;SPAN style="font-size: 13.3333px; text-align: center;"&gt;&lt;EM&gt;&lt;STRONG&gt;29/06/2015&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; text-align: center;" width="97"&gt;2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; text-align: center;" width="69"&gt;&lt;SPAN style="font-size: 13.3333px; text-align: center;"&gt;31/07/2015&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; text-align: center;" width="80"&gt;&lt;SPAN style="font-size: 13.3333px; text-align: center;"&gt;&lt;EM&gt;&lt;STRONG&gt;01/09/2015&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212635#M876779</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: In Script select a date filtered on another date field</title>
      <link>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212636#M876780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you have Headcount table and you are trying to create TempTable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 16:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212636#M876780</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-24T16:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: In Script select a date filtered on another date field</title>
      <link>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212637#M876781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Thanks for the help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m trying to build TempTable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to filter the Start Date field down to just one Last Start Date for each Person Number. This can go in TempTable, or a new table if necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have the script below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Headcount:&lt;/P&gt;&lt;P&gt;LOAD ,&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tempTable:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;       ,&lt;/P&gt;&lt;P&gt;       Max() as ,&lt;/P&gt;&lt;P&gt;Min() Where ( &amp;gt; Max()) as    // This does not work.&lt;/P&gt;&lt;P&gt;Resident Headcount&lt;/P&gt;&lt;P&gt;Where  &amp;lt;= Today(0)&lt;/P&gt;&lt;P&gt;Group By ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212637#M876781</guid>
      <dc:creator />
      <dc:date>2016-10-25T09:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: In Script select a date filtered on another date field</title>
      <link>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212638#M876782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Headcount:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Person Number], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Start Date], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Leaving Date]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2003" data-containertype="14" data-objectid="237456" data-objecttype="1" href="https://community.qlik.com/thread/237456"&gt;https://community.qlik.com/thread/237456&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(html, codepage is 1252, embedded labels, table is @1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (Headcount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Person Number],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Leaving Date] as Temp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Headcount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Len(Trim([Leaving Date])) &amp;gt; 0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TempTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Person Number],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; [Leaving Date] as [Last Leaving Date]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Headcount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where Len(Trim([Leaving Date])) &amp;gt; 0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (TempTable)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Person Number],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Date(Min([Start Date])) as [Last Start Date]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Headcount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Where [Start Date] &amp;gt; Temp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By [Person Number];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Field Temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/141934_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 23:14:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212638#M876782</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-25T23:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: In Script select a date filtered on another date field</title>
      <link>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212639#M876783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works great! Thanks again Sunny!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 09:16:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/In-Script-select-a-date-filtered-on-another-date-field/m-p/1212639#M876783</guid>
      <dc:creator />
      <dc:date>2016-10-26T09:16:16Z</dc:date>
    </item>
  </channel>
</rss>

