<?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: how get max date records in script...??? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-get-max-date-records-in-script/m-p/954503#M467037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&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;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;LOAD D&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;istinct (item &amp;amp; vendor &amp;amp; plant) as item_vendor_plant_key,&lt;/SPAN&gt;&lt;/STRONG&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;SPAN style="color: #575757; font-size: 12pt;"&gt;&lt;STRONG style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(amendment, &lt;SPAN style="color: #ff0000;"&gt;-&lt;/SPAN&gt;[amendment date]) as MaxDateAmendment,&lt;/STRONG&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;SPAN style="color: #575757; font-size: 12pt;"&gt;&lt;STRONG style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Max([amendment date])) as MaxAmendmentDate,&lt;/STRONG&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;SPAN style="color: #575757; font-size: 12pt;"&gt;&lt;STRONG style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(rate, &lt;SPAN style="color: #ff0000;"&gt;-&lt;/SPAN&gt;[amendment date]) as MaxDateRate&lt;/STRONG&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;SPAN style="color: #575757; font-size: 12pt;"&gt;&lt;STRONG style="font-family: arial, helvetica, sans-serif;"&gt;Resident poam_table&lt;/STRONG&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;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;Group By &lt;SPAN style="font-style: inherit;"&gt;item, vendor, plant&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&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;STRONG&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&gt;UPDATE: &lt;/STRONG&gt;Missed the negative sign next to amendment date in the first sorted value&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Dec 2015 11:31:12 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-12-18T11:31:12Z</dc:date>
    <item>
      <title>how get max date records in script...???</title>
      <link>https://community.qlik.com/t5/QlikView/how-get-max-date-records-in-script/m-p/954502#M467036</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;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;issue :&lt;/STRONG&gt;&lt;/SPAN&gt; I have tried to get record in script from table based on max date but unable to get it.&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;background :&lt;/STRONG&gt; I have price amendment table, which contents item wise date wise price change history for all the items.&lt;/P&gt;&lt;P&gt;example : item xyz may have amend 10 times, so table will have date wise 10 records along with some other information.&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;i want :&lt;/STRONG&gt; i wanted to pick the max date&amp;nbsp; or latest record for the item along with other details&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;what i tried :&lt;/STRONG&gt;&lt;/SPAN&gt; i have tried group by but unable to get desired output&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my data base :&lt;/P&gt;&lt;P&gt;i wanted to have record which is highlighted in yellow colour&amp;nbsp; (i.e&amp;nbsp; wanted to have record which has max amendment date along with other details)&lt;/P&gt;&lt;P&gt;(constraint : no aggregation for rate column)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2015-12-18_11-04-41.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/109387_2015-12-18_11-04-41.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;i used following code but no desired out put&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load*&lt;/P&gt;&lt;P&gt;distinct (item &amp;amp; vendor &amp;amp; plant) as item_vendor_plant_key,&lt;/P&gt;&lt;P&gt;max(amendment),&lt;/P&gt;&lt;P&gt;max(date (amendment date)),&lt;/P&gt;&lt;P&gt;rate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //----i donot want to use aggregation here nor i wanted to put it in group by---&lt;/P&gt;&lt;P&gt;resident poam_table&lt;/P&gt;&lt;P&gt;group by &lt;SPAN style="font-size: 13.3333px;"&gt;(item &amp;amp; vendor &amp;amp; plant) &lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 05:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-get-max-date-records-in-script/m-p/954502#M467036</guid>
      <dc:creator>santoshrai</dc:creator>
      <dc:date>2015-12-18T05:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: how get max date records in script...???</title>
      <link>https://community.qlik.com/t5/QlikView/how-get-max-date-records-in-script/m-p/954503#M467037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&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;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;LOAD D&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;istinct (item &amp;amp; vendor &amp;amp; plant) as item_vendor_plant_key,&lt;/SPAN&gt;&lt;/STRONG&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;SPAN style="color: #575757; font-size: 12pt;"&gt;&lt;STRONG style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(amendment, &lt;SPAN style="color: #ff0000;"&gt;-&lt;/SPAN&gt;[amendment date]) as MaxDateAmendment,&lt;/STRONG&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;SPAN style="color: #575757; font-size: 12pt;"&gt;&lt;STRONG style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Max([amendment date])) as MaxAmendmentDate,&lt;/STRONG&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;SPAN style="color: #575757; font-size: 12pt;"&gt;&lt;STRONG style="font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(rate, &lt;SPAN style="color: #ff0000;"&gt;-&lt;/SPAN&gt;[amendment date]) as MaxDateRate&lt;/STRONG&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;SPAN style="color: #575757; font-size: 12pt;"&gt;&lt;STRONG style="font-family: arial, helvetica, sans-serif;"&gt;Resident poam_table&lt;/STRONG&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;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;Group By &lt;SPAN style="font-style: inherit;"&gt;item, vendor, plant&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&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;STRONG&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&gt;UPDATE: &lt;/STRONG&gt;Missed the negative sign next to amendment date in the first sorted value&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 11:31:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-get-max-date-records-in-script/m-p/954503#M467037</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-18T11:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: how get max date records in script...???</title>
      <link>https://community.qlik.com/t5/QlikView/how-get-max-date-records-in-script/m-p/954504#M467038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent solution,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it worked and produced desirable output for me. Many many thanks buddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mean while i have&amp;nbsp; found alternate solution for the same (it is quite lengthy but works good too)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;step 1st :&lt;/STRONG&gt; Create key in poam_table (&lt;SPAN style="font-size: 16px;"&gt;item_vendor_plant_amd_key)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;step 2nd:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;left join (poam_table)&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;D&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;istinct item &amp;amp; vendor &amp;amp; plant &amp;amp; max(amendment) as item_vendor_plant_amd_key,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;'max_amendment_no' as max_amdendment_flag&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;resident poam_table;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;step 3rd:&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;poam_new:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;load*,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;resident poam_table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;where &lt;SPAN style="font-size: 16px;"&gt;max_amdendment_flag='&lt;SPAN style="font-size: 16px;"&gt;max_amendment_no';&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;SPAN style="font-size: 16px;"&gt;drop table poam_table;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-style: inherit; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-style: inherit; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-style: inherit; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;but once again many thanks to you...you saved my time.....&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-style: inherit; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-style: inherit; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Dec 2015 05:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-get-max-date-records-in-script/m-p/954504#M467038</guid>
      <dc:creator>santoshrai</dc:creator>
      <dc:date>2015-12-20T05:00:52Z</dc:date>
    </item>
  </channel>
</rss>

