<?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: Max of a Date - in LOAD Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802385#M283240</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;What is your source? What result are you getting for the above solutions?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2015 06:21:37 GMT</pubDate>
    <dc:creator>anbu1984</dc:creator>
    <dc:date>2015-02-27T06:21:37Z</dc:date>
    <item>
      <title>Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802380#M283235</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;I have a data set like this below:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/79388_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to write LOAD script, so that it would fetch the Max(CONFIRM_CREATE_DTE) and I will have one record: 02/14/2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already tried using MAX() and First Sorted Value, but in vain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please help here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 05:47:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802380#M283235</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2015-02-27T05:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802381#M283236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dmohanthy,&lt;/P&gt;&lt;P&gt;Try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let Var1=Max(CONFIRM_CREATE_DTE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from table name&lt;/P&gt;&lt;P&gt;where CONFIRM_CREATE_DTE= $(Var1),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 05:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802381#M283236</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2015-02-27T05:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802382#M283237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you tried like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(CONFIRM_CREATE_DTE) AS MAX&lt;SPAN style="font-size: 13.3333330154419px;"&gt;CONFIRM_CREATE_DTE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Resident TableName;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 05:50:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802382#M283237</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2015-02-27T05:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802383#M283238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adhimulam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried like this as well, but it didn't work &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 05:58:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802383#M283238</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2015-02-27T05:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802384#M283239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not working either &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 06:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802384#M283239</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2015-02-27T06:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802385#M283240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;What is your source? What result are you getting for the above solutions?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 06:21:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802385#M283240</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2015-02-27T06:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802386#M283241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check your date format,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to make it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let Var1=Max(CONFIRM_CREATE_DTE);&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;date(CONFIRM_CREATE_DTE,'MM/DD/YYYY') as CONFIRM_CREATE_DTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from table&lt;/P&gt;&lt;P&gt;where CONFIRM_CREATE_DTE= $(Var1),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 06:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802386#M283241</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2015-02-27T06:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802387#M283242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the result you are getting?&lt;/P&gt;&lt;P&gt;If you don't get any,then this means your date field is not formatted as date field. It considers the field data type as text.&lt;/P&gt;&lt;P&gt;You need to convert this &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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Max(Date(Date#(CONFIRM_CREATE_DTE, 'MM/DD/YYYY'))) AS MAX&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;CONFIRM_CREATE_DTE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;Resident TableName;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 06:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802387#M283242</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2015-02-27T06:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802388#M283243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Test.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/79387_Test.PNG" style="height: auto; width: auto;" /&gt;Try Like this....It is working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 06:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802388#M283243</guid>
      <dc:creator />
      <dc:date>2015-02-27T06:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802389#M283244</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 this way,&lt;/P&gt;&lt;P&gt;Here is a sample approach,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;table1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Number,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date_1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;D&gt;&lt;/D&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;table2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NoConcatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Number,ID,Date(Max(Date(Date#(Date_1, 'MM/DD/YYYY')))) as MDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident table1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP table1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working fine..&lt;/P&gt;&lt;P&gt;At the time u load data..u cant use MAX()(which means u r aggregating at the time fetching), because the script executes sequentially and thus Max() can be calculated only the after is fetched from source......so follow the way as above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 15:38:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802389#M283244</guid>
      <dc:creator>praveenak</dc:creator>
      <dc:date>2015-03-02T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Max of a Date - in LOAD Script</title>
      <link>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802390#M283245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Depending on your data amount I would add an extra step for performance otherwise you can skip &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TempDates&lt;/SPAN&gt;.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;TempDates:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load distinct &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CONFIRM_CREATE_DTE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;resident YOURTABLE;&lt;/SPAN&gt;&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 style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;VarTemp:&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CONFIRM_CREATE_DTE&lt;/SPAN&gt;) as MaxDate&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TempDates&lt;/SPAN&gt;;&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;LET vMaxDate = peek('MaxDate');&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;Drop Tables &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TempDates,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;VarTemp&lt;/SPAN&gt;&lt;/SPAN&gt;;&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 style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Now you have on variable with your value. if you want it in your table do a resident load again and add your variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 15:48:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Max-of-a-Date-in-LOAD-Script/m-p/802390#M283245</guid>
      <dc:creator>linusblomberg</dc:creator>
      <dc:date>2015-03-02T15:48:33Z</dc:date>
    </item>
  </channel>
</rss>

