<?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: group by using max(Date) and additional condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1526042#M748226</link>
    <description>&lt;P&gt;Thank you, Rob!&lt;/P&gt;&lt;P&gt;I missed that point.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2019 20:37:19 GMT</pubDate>
    <dc:creator>bgerchikov</dc:creator>
    <dc:date>2019-01-03T20:37:19Z</dc:date>
    <item>
      <title>group by using max(Date) and additional condition</title>
      <link>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1525977#M748221</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I need to create a table (inside script editor) based on max(Date) available for each product and considering max(Price) value in case I have multiple prices for the same max(Date).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="max_group.jpg" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/2956i1BA85DCF59CFC316/image-size/large?v=v2&amp;amp;px=999" role="button" title="max_group.jpg" alt="max_group.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Could someone help me build this logic?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:51:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1525977#M748221</guid>
      <dc:creator>alessandrotk</dc:creator>
      <dc:date>2024-11-16T04:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: group by using max(Date) and additional condition</title>
      <link>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1525986#M748222</link>
      <description>&lt;P&gt;Simple Group By should work for you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TempData:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[&lt;BR /&gt;Product, Date, Price&lt;BR /&gt;Apple,43404,15&lt;BR /&gt;Apple,43403,15&lt;BR /&gt;Apple,43402,20&lt;BR /&gt;Apple,43401,14&lt;BR /&gt;Banana,43404,100&lt;BR /&gt;Banana,43404,150&lt;BR /&gt;Banana,43402,70&lt;BR /&gt;Banana,43401,70&lt;BR /&gt;Banana,43400,70&lt;BR /&gt;Banana,43339,50&lt;BR /&gt;]&lt;BR /&gt;;&lt;BR /&gt;Data:&lt;BR /&gt;NoConcatenate Load&lt;BR /&gt;&amp;nbsp;Product,&lt;BR /&gt;&amp;nbsp;Max(Date) as MaxDate,&lt;BR /&gt;&amp;nbsp;Max(Price) as MaxPrice&lt;BR /&gt;Resident&lt;BR /&gt;&amp;nbsp;TempData&lt;BR /&gt;Group By&lt;BR /&gt;&amp;nbsp;Product&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;drop Table TempData;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 17:46:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1525986#M748222</guid>
      <dc:creator>bgerchikov</dc:creator>
      <dc:date>2019-01-03T17:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: group by using max(Date) and additional condition</title>
      <link>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1525989#M748223</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your help, but I need the max(Date) record and, in the same condition, I need the max(Price) within max(Date).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="max_group.jpg" style="width: 975px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/2956i1BA85DCF59CFC316/image-size/large?v=v2&amp;amp;px=999" role="button" title="max_group.jpg" alt="max_group.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Just like the last table on the right side of the picture (expected output).&lt;/P&gt;&lt;P&gt;In your example it's getting the max(Date) and max(Price) separated for each product.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 17:57:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1525989#M748223</guid>
      <dc:creator>alessandrotk</dc:creator>
      <dc:date>2019-01-03T17:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: group by using max(Date) and additional condition</title>
      <link>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1525993#M748224</link>
      <description>&lt;P&gt;I've changed dates for Banana. Works ok.&lt;/P&gt;&lt;P&gt;TempData:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[&lt;BR /&gt;Product, Date, Price&lt;BR /&gt;Apple,43404,15&lt;BR /&gt;Apple,43403,15&lt;BR /&gt;Apple,43402,20&lt;BR /&gt;Apple,43401,14&lt;BR /&gt;Banana,42404,100&lt;BR /&gt;Banana,42404,150&lt;BR /&gt;Banana,42402,70&lt;BR /&gt;Banana,42401,70&lt;BR /&gt;Banana,42400,70&lt;BR /&gt;Banana,42339,50&lt;BR /&gt;]&lt;BR /&gt;;&lt;BR /&gt;Data:&lt;BR /&gt;NoConcatenate Load&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Product,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Max(Date) as MaxDate,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Max(Price) as MaxPrice&lt;BR /&gt;Resident&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;TempData&lt;BR /&gt;Group By&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Product&lt;BR /&gt;;&lt;BR /&gt;drop Table TempData;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 18:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1525993#M748224</guid>
      <dc:creator>bgerchikov</dc:creator>
      <dc:date>2019-01-03T18:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: group by using max(Date) and additional condition</title>
      <link>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1526038#M748225</link>
      <description>&lt;P&gt;I think you have to do the max() in two passes to cover the case where max Price may not be on max Date.&amp;nbsp; For example in the case below max price for Banana (180) occurs on an earlier day, but the OP asked for the max price on the max date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;TempData:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Load * Inline&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Product, Date, Price&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Apple,43404,15&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Apple,43403,15&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Apple,43402,20&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Apple,43401,14&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Banana,42404,100&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Banana,42404,150&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Banana,42402,70&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Banana,42401,70&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Banana,42400,70&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Banana,42339,180&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Data:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NoConcatenate Load&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Product,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Max(Date) as Date&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Resident&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TempData&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Group By&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Product&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Left Join(Data)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Product,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Date,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Max(Price) as Price&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Resident&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;TempData&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Group By&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Product, Date&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;drop Table TempData;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 20:27:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1526038#M748225</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2019-01-03T20:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: group by using max(Date) and additional condition</title>
      <link>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1526042#M748226</link>
      <description>&lt;P&gt;Thank you, Rob!&lt;/P&gt;&lt;P&gt;I missed that point.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 20:37:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/group-by-using-max-Date-and-additional-condition/m-p/1526042#M748226</guid>
      <dc:creator>bgerchikov</dc:creator>
      <dc:date>2019-01-03T20:37:19Z</dc:date>
    </item>
  </channel>
</rss>

