<?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: MIN and MAX Date in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402785#M1151675</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt; min(QtrDates) as MinDate,&lt;/P&gt;&lt;P&gt;max(QtrDates) as MaxDate&lt;/P&gt;&lt;P&gt;Resident CurrentQtr&amp;nbsp;&amp;nbsp;&amp;nbsp; Group by fieldname; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table CurrentQtr;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 06:56:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-26T06:56:02Z</dc:date>
    <item>
      <title>MIN and MAX Date in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402783#M1151672</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;Could someone help me show me how to add 2 new fields for the MIN and MAX&amp;nbsp; of the field QtrDates... I'm trying to get the MIN and MAX dates of the Current Quarter (QtrDates)... I tried loading it but it keeps saying invalid function... I just don't know exactly which part of the scrpt&amp;nbsp; should I insert this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to look at the attached file to a better undestanding...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 22:51:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402783#M1151672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-25T22:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: MIN and MAX Date in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402784#M1151674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;You can use the below script for calculating the minimum and the maximum date of QtrDates and store this results in variables.This result stored in variable can be used whenever required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD min(QtrDates) as MinDate&lt;/P&gt;&lt;P&gt;Resident CurrentQtr; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp1:&lt;/P&gt;&lt;P&gt;LOAD max(QtrDates) as MaxDate&lt;/P&gt;&lt;P&gt;Resident CurrentQtr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = num(floor(peek(MinDate,0,Temp)));&lt;/P&gt;&lt;P&gt;LET vMaxDate = num(floor(peek(MaxDate,0,Temp1)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Temp,Temp1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Snehal Nabar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 06:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402784#M1151674</guid>
      <dc:creator />
      <dc:date>2013-04-26T06:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: MIN and MAX Date in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402785#M1151675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt; min(QtrDates) as MinDate,&lt;/P&gt;&lt;P&gt;max(QtrDates) as MaxDate&lt;/P&gt;&lt;P&gt;Resident CurrentQtr&amp;nbsp;&amp;nbsp;&amp;nbsp; Group by fieldname; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table CurrentQtr;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 06:56:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402785#M1151675</guid>
      <dc:creator />
      <dc:date>2013-04-26T06:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: MIN and MAX Date in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402786#M1151676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vishwaranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your script will return the erro r: &lt;STRONG&gt;invalid expression.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Snehal Nabar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 07:22:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402786#M1151676</guid>
      <dc:creator />
      <dc:date>2013-04-26T07:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: MIN and MAX Date in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402787#M1151677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vishwaranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your script will return the error: &lt;STRONG&gt;invalid expression.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Snehal Nabar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 07:22:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402787#M1151677</guid>
      <dc:creator />
      <dc:date>2013-04-26T07:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: MIN and MAX Date in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402788#M1151678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Snehal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this but I got this error message...pls. take note that the QtrDates came from a joint table...Does it have someting to do with it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field not found - &amp;lt;QtrDates&amp;gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD min(QtrDates) as MinDate&lt;/P&gt;&lt;P&gt;Resident CurrentQtr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 16:49:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402788#M1151678</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-26T16:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: MIN and MAX Date in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402789#M1151679</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;Check whether &lt;STRONG&gt;CurrentQtr &lt;/STRONG&gt;table is loaded before the above mentioned script.&lt;/P&gt;&lt;P&gt;As Temp table uses resident load to load data from CurrentQtr table to&amp;nbsp; perform calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Snehal Nabar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 12:55:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402789#M1151679</guid>
      <dc:creator />
      <dc:date>2013-04-29T12:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: MIN and MAX Date in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402790#M1151680</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;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(DateFieldName) as MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(DateFieldName) as MaxDate&lt;/P&gt;&lt;P&gt;Resident TableName; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMinDate = floor(peek('MinDate'));&lt;/P&gt;&lt;P&gt;LET vMaxDate = floor(peek('MaxDate'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table TableName;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the two variables vMinDate and vMaxDate has min and max dates respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 14:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402790#M1151680</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-04-29T14:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: MIN and MAX Date in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402791#M1151681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Snehal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh!&amp;nbsp; i got it&amp;nbsp; now,,... I forgot to name a new table when I did a left join.&amp;nbsp; This work perfectly now... However, how come the results&amp;nbsp; showed up as numbers when my&amp;nbsp; Qtrdates field is already in date format?&amp;nbsp; I tried using the DATE# and Date function but to no avail.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2013 19:17:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MIN-and-MAX-Date-in-Load-Script/m-p/402791#M1151681</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-30T19:17:03Z</dc:date>
    </item>
  </channel>
</rss>

