<?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: Scripting help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Scripting-help/m-p/435563#M162435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess I am very close:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LeaseOption:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Median(Subtype) as [Option Type], &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateType &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(Date#(LEFT(Date,10),'YYYY-MM-DD')) as Date&lt;/P&gt;&lt;P&gt;RESIDENT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; KeyDate&lt;/P&gt;&lt;P&gt;where DateType='Notice End'&lt;/P&gt;&lt;P&gt;Group by&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, DateType ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the only thing need to be fixed is the highlited line to show the right value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thxs,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2012 17:46:38 GMT</pubDate>
    <dc:creator>alec1982</dc:creator>
    <dc:date>2012-12-13T17:46:38Z</dc:date>
    <item>
      <title>Scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-help/m-p/435561#M162433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 426px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="81"&gt;ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="107"&gt;Subtype&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="92"&gt;DateType&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="146"&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;117835&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Commencement&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;3/1/2002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;117835&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;CPI Increase&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;3/1/2002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;117835&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Expiration&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2/28/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;117835&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Cancellation Option&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Notice End&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;3/1/2005&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;117835&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;R of First Refusal&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Notice End&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2/28/2007&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;117835&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Renewal Option&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Notice End&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;8/31/2010&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;117835&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Termination Option&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Notice End&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;8/31/2009&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to write a script to show the max date grouped by the ID and Date Type where the DateType ='Notice Date' and then show the value of the Subtype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my result table should look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;117835&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Termination Option&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Notice End&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8/31/2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thxs,&lt;/P&gt;&lt;P&gt;Alec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 17:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-help/m-p/435561#M162433</guid>
      <dc:creator>alec1982</dc:creator>
      <dc:date>2012-12-13T17:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-help/m-p/435562#M162434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming that your the above information in TempTable &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempTable:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;From....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate//used because of the table below also going to be in same struct&lt;/P&gt;&lt;P&gt;TempTable1:&lt;/P&gt;&lt;P&gt;Load * &lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;TempTable where DateType='Notice End'&lt;/P&gt;&lt;P&gt;Order by ID,DateType,Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;LastValue(SubType) AS SubType,&lt;/P&gt;&lt;P&gt;DateType,&lt;/P&gt;&lt;P&gt;Max(Date) AS MaxDate&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;TempTable1&lt;/P&gt;&lt;P&gt;Group by ID, DateType;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table TempTable, TempTable1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 17:45:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-help/m-p/435562#M162434</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-12-13T17:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting help</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-help/m-p/435563#M162435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess I am very close:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LeaseOption:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Median(Subtype) as [Option Type], &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateType &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(Date#(LEFT(Date,10),'YYYY-MM-DD')) as Date&lt;/P&gt;&lt;P&gt;RESIDENT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; KeyDate&lt;/P&gt;&lt;P&gt;where DateType='Notice End'&lt;/P&gt;&lt;P&gt;Group by&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, DateType ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the only thing need to be fixed is the highlited line to show the right value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thxs,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 17:46:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-help/m-p/435563#M162435</guid>
      <dc:creator>alec1982</dc:creator>
      <dc:date>2012-12-13T17:46:38Z</dc:date>
    </item>
  </channel>
</rss>

