<?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: Aggregate using latest value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-using-latest-value/m-p/1037072#M932911</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;Are you looking like this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2016 12:27:51 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2016-03-09T12:27:51Z</dc:date>
    <item>
      <title>Aggregate using latest value</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-using-latest-value/m-p/1037071#M932910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;Is there a way to do aggregation using the latest value. I have a table list statues of orders by date. what I need is to count the number of orders at the end of the selected period according to their latest status. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Suppose I have this table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 252px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; border-left-width: 0.5pt; border-left-color: #95b3d7; background: #4f81bd;" width="81"&gt;Order_no&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #4f81bd;" width="96"&gt;Status&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: white; font-weight: bold; font-family: Calibri; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: #95b3d7; border-right-width: 0.5pt; border-right-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #4f81bd;" width="75"&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; border-left-width: 0.5pt; border-left-color: #95b3d7; background: #dce6f1;"&gt;1&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #dce6f1;"&gt;Received&lt;/TD&gt;&lt;TD align="right" class="xl63" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: #95b3d7; border-right-width: 0.5pt; border-right-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #dce6f1;"&gt;01/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; border-left-width: 0.5pt; border-left-color: #95b3d7;"&gt;1&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7;"&gt;Under process&lt;/TD&gt;&lt;TD align="right" class="xl63" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: #95b3d7; border-right-width: 0.5pt; border-right-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7;"&gt;02/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; border-left-width: 0.5pt; border-left-color: #95b3d7; background: #dce6f1;"&gt;1&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #dce6f1;"&gt;Completed&lt;/TD&gt;&lt;TD align="right" class="xl63" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: #95b3d7; border-right-width: 0.5pt; border-right-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #dce6f1;"&gt;02/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; border-left-width: 0.5pt; border-left-color: #95b3d7;"&gt;2&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7;"&gt;Received&lt;/TD&gt;&lt;TD align="right" class="xl63" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: #95b3d7; border-right-width: 0.5pt; border-right-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7;"&gt;02/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; border-left-width: 0.5pt; border-left-color: #95b3d7; background: #dce6f1;"&gt;2&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #dce6f1;"&gt;Under process&lt;/TD&gt;&lt;TD align="right" class="xl63" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: #95b3d7; border-right-width: 0.5pt; border-right-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #dce6f1;"&gt;02/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; border-left-width: 0.5pt; border-left-color: #95b3d7;"&gt;2&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7;"&gt;Under process&lt;/TD&gt;&lt;TD align="right" class="xl63" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: #95b3d7; border-right-width: 0.5pt; border-right-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7;"&gt;03/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; border-left-width: 0.5pt; border-left-color: #95b3d7; background: #dce6f1;"&gt;3&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #dce6f1;"&gt;Received&lt;/TD&gt;&lt;TD align="right" class="xl63" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: #95b3d7; border-right-width: 0.5pt; border-right-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; background: #dce6f1;"&gt;02/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none solid solid; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7; border-left-width: 0.5pt; border-left-color: #95b3d7;"&gt;3&lt;/TD&gt;&lt;TD style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid none; border-top-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7;"&gt;Completed&lt;/TD&gt;&lt;TD align="right" class="xl63" style="font-size: 11pt; color: black; font-family: Calibri; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: #95b3d7; border-right-width: 0.5pt; border-right-color: #95b3d7; border-bottom-width: 0.5pt; border-bottom-color: #95b3d7;"&gt;03/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if my date filter selected all dates less than or equal 03/01/2016 I would expect to get&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Received 0&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (for non)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Completed 2 &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (for 1 and 3)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Under process 1 &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (for 2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if my date filter selected all dates less than or equal 02/01/2016 &lt;SPAN style="font-size: 13.3333px;"&gt; I would expect to get&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Received 2&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (for 2 and 3)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Completed 1 &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (for 2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Under process 2 &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (for 1 and 2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have tried to use this code but it gave me an error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Count({$&amp;lt;Date = {'$(=aggr(max(Date),Order_no))'} &amp;gt;} distinct Order_no)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;any help from you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&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/Aggregate-using-latest-value/m-p/1037071#M932910</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate using latest value</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-using-latest-value/m-p/1037072#M932911</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;Are you looking like this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 12:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-using-latest-value/m-p/1037072#M932911</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2016-03-09T12:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate using latest value</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-using-latest-value/m-p/1037073#M932912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry I cannot open the file as I have the free version right now. could you please post the script over here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 03:55:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-using-latest-value/m-p/1037073#M932912</guid>
      <dc:creator />
      <dc:date>2016-03-10T03:55:27Z</dc:date>
    </item>
  </channel>
</rss>

