<?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 Select the last Date in the field into the Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107008#M366559</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to assimilate to the named 'Last_Update_NBI' the last Date present into the field [AIR Import Data], so i did this into the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load Distinct [AIR Import Data] as LastAsOf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;resident [FinalTable];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let Last_Update_NBI = Date(Peek('LastAsOf'), 'DD/MM/YYYY');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it return that:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125104_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where 31/12/2015 is considered as the last value by QlikView &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use the MAX() function but it doen't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do that please ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you in advance for your help,&lt;/P&gt;&lt;P&gt;Sébastien.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 May 2016 16:37:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-05-19T16:37:37Z</dc:date>
    <item>
      <title>Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107008#M366559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to assimilate to the named 'Last_Update_NBI' the last Date present into the field [AIR Import Data], so i did this into the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load Distinct [AIR Import Data] as LastAsOf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;resident [FinalTable];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let Last_Update_NBI = Date(Peek('LastAsOf'), 'DD/MM/YYYY');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it return that:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125104_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where 31/12/2015 is considered as the last value by QlikView &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use the MAX() function but it doen't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do that please ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you in advance for your help,&lt;/P&gt;&lt;P&gt;Sébastien.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107008#M366559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-19T16:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107009#M366560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you are saying this did not work with Max (like below)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LOAD Max([AIR Import Data]) as LastAsOf&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Resident [FinalTable];&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LET Last_Update_NBI = Date(Peek('LastAsOf'), 'DD/MM/YYYY');&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:39:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107009#M366560</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T16:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107010#M366561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The table &lt;STRONG style="font-style: inherit; font-size: 13px; font-family: inherit; color: #3d3d3d;"&gt;[AIR Import Data] &lt;/STRONG&gt;is defined like this before:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date(LEFT(RIGHT('$(File)',15),10),'DD/MM/YYYY') as [AIR Import Data].&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:42:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107010#M366561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-19T16:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107011#M366562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think using MAX() should work... Can you take a look once again please...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107011#M366562</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-05-19T16:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107012#M366563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly are you wanting to see?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:45:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107012#M366563</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T16:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107013#M366564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot ! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:52:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107013#M366564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-19T16:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107014#M366565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it did work with Max?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:53:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107014#M366565</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T16:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107015#M366566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your date was not loaded as a "proper" (numeric) date. You need to add a date#() function to tell QV how to parse the date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(&lt;STRONG&gt;Date#(&lt;/STRONG&gt;LEFT(RIGHT('$(File)',15),10)&lt;STRONG&gt;,'DD/MM/YYYY')&lt;/STRONG&gt;, &lt;SPAN style="font-size: 13.3333px;"&gt;'DD/MM/YYYY')&lt;/SPAN&gt; as [AIR Import Data]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After loading this way, max() should work. Without date#(), the values are considered strings and "31" is greater than "29".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com/" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com/" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107015#M366566</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-05-19T16:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107016#M366567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob correct me if I am wrong, but if the environmental variable use the following DateFormat = 'DD/MM/YYYY', won't the Date() function recognize the string as date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:56:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107016#M366567</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T16:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107017#M366568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;Good point and that appears to be what's happening here. However, I don't think the date() function has anything to do with it. QV will recognize the string "DD/MM/YYYY" as a date because it matches the DateFormat variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the date#() is not necessary, but neither is the date(). It should work with the shorter form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LEFT(RIGHT('$(File)',15),10)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 17:14:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107017#M366568</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-05-19T17:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107018#M366569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed, unless another type of format is desired using the Date() function it won't make a difference &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 17:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107018#M366569</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T17:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107019#M366570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 20:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107019#M366570</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-19T20:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Select the last Date in the field into the Script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107020#M366571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 21:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-the-last-Date-in-the-field-into-the-Script/m-p/1107020#M366571</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-19T21:00:37Z</dc:date>
    </item>
  </channel>
</rss>

