<?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: Need Max date field in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385467#M820545</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;Load it in a temp table and store the result in a Variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Temp:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(DateFieldName) as MinDate,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(DateFieldName) as MaxDate&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident TableName;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Refer the below thread:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlikview.com/thread/80726" title="https://community.qlikview.com/thread/80726"&gt;MIN and MAX Date in Load Script | Qlik Community&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Aug 2017 06:09:12 GMT</pubDate>
    <dc:creator>techvarun</dc:creator>
    <dc:date>2017-08-11T06:09:12Z</dc:date>
    <item>
      <title>Need Max date field in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385466#M820544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get max(OpenDate) from a table in resident load, but not getting its showing error like invalid expression&lt;/P&gt;&lt;P&gt;any suggestion plz. &lt;STRONG&gt;OpenDate format is in&amp;nbsp; : 02-08-2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;See below screen shot.&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/173132_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&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/Need-Max-date-field-in-load-script/m-p/1385466#M820544</guid>
      <dc:creator>Rajesh</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need Max date field in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385467#M820545</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;Load it in a temp table and store the result in a Variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Temp:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min(DateFieldName) as MinDate,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(DateFieldName) as MaxDate&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident TableName;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Refer the below thread:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlikview.com/thread/80726" title="https://community.qlikview.com/thread/80726"&gt;MIN and MAX Date in Load Script | Qlik Community&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 06:09:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385467#M820545</guid>
      <dc:creator>techvarun</dc:creator>
      <dc:date>2017-08-11T06:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need Max date field in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385468#M820546</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 thing you forget to use Group By in script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;Max(OpenDate) as CurrentDate&lt;/P&gt;&lt;P&gt;Resident Incident&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Group By&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;Your all fields here that you load in this table ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ID,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Max(OpenDate) as CurrentDate&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Resident Incident&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;EM&gt;Group By ID;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;EM&gt;Regards,&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;EM&gt;Anand&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 06:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385468#M820546</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-08-11T06:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need Max date field in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385469#M820547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Varun for u r immidiate responce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my load statement like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;Max(OpenDate) as CurrentDate&lt;/P&gt;&lt;P&gt;Resident Incident;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it showing invalid expression error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 06:17:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385469#M820547</guid>
      <dc:creator>Rajesh</dc:creator>
      <dc:date>2017-08-11T06:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need Max date field in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385470#M820548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Incident how many fields are there just check and use them in your Group By statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 06:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385470#M820548</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-08-11T06:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need Max date field in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385471#M820549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You Forgot to group use group by.&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;Load *,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Max(OpenDate) as CurrentDate&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Incident;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;In Your below Script, You need to mention alll the field which is there in *.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert for more Clarity and if it is not resolved.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Vanraj Dinesh Bohra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 06:52:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385471#M820549</guid>
      <dc:creator>bohravanraj</dc:creator>
      <dc:date>2017-08-11T06:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need Max date field in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385472#M820550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;Here's another method,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;OpenDate&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;Load max(Temp) as Max&lt;SPAN style="font-size: 13.3333px;"&gt;OpenDate&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;LOAD FieldValue('&lt;SPAN style="font-size: 13.3333px;"&gt;OpenDate&lt;/SPAN&gt;',IterNo()) as Temp&lt;/P&gt;&lt;P&gt;AutoGenerate 1 While not IsNull(FieldValue('OpenDate',IterNo()));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let v&lt;SPAN style="font-size: 13.3333px;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;OpenDate&lt;/SPAN&gt; = Floor(Peek('&lt;SPAN style="font-size: 13.3333px;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;OpenDate&lt;/SPAN&gt;',0,'&lt;SPAN style="font-size: 13.3333px;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;OpenDate&lt;/SPAN&gt;'));&lt;/P&gt;&lt;P&gt;DROP Table &lt;SPAN style="font-size: 13.3333px;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;OpenDate&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a large dataset from which to obtain your max date you will find this will run quicker because rather than go through maybe millions of lines this code goes through the distinct field values of OpenDate which will number maybe only a few hundred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 07:43:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385472#M820550</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-08-11T07:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need Max date field in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385473#M820551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you All for u r valid suggestions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i was looking for NoOfDates between Current&amp;nbsp; and previous date&lt;/P&gt;&lt;P&gt;done by using precising load ---Floor(Today()- OpenDate) as Days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 10:00:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-Max-date-field-in-load-script/m-p/1385473#M820551</guid>
      <dc:creator>Rajesh</dc:creator>
      <dc:date>2017-08-11T10:00:02Z</dc:date>
    </item>
  </channel>
</rss>

