<?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 Function Usage in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251711#M859395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could not open the file&lt;/P&gt;&lt;P&gt;Can you pl post the expressions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 Jan 2017 17:45:47 GMT</pubDate>
    <dc:creator>umashankarus</dc:creator>
    <dc:date>2017-01-29T17:45:47Z</dc:date>
    <item>
      <title>Aggregate Function Usage</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251706#M859390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;Below is my dataset in a straight table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trying to fetch one row per document satisfying the following conditions&lt;/P&gt;&lt;P&gt;1) the document record with latest version (column # 2) [ ex: Doc # 1181 with ver 6 ]&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;P&gt;2) If version is same for a document, then fetch one with latest date (column #3) [ ex: Doc # 1188&amp;nbsp; with date 12/20/....]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the expression, Used Aggregate function = MAX(Aggr(MAX(VERSION),DOC_NUMBER))&lt;/P&gt;&lt;P&gt;Result is correct only for 1 data row (ex: Doc # 1272 ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong here ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Umashankar&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-Function-Usage/m-p/1251706#M859390</guid>
      <dc:creator>umashankarus</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Function Usage</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251707#M859391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MAX(TOTAL &amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DOC_NUMBER&lt;/SPAN&gt;&amp;gt; Aggr(MAX(VERSION),DOC_NUMBER))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2017 08:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251707#M859391</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-01-29T08:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Function Usage</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251708#M859392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post excel sample&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2017 08:31:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251708#M859392</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-01-29T08:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Function Usage</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251709#M859393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;I have attached the excel output after modification&lt;/P&gt;&lt;P&gt;This does not consider the 'Date' column&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2017 08:41:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251709#M859393</guid>
      <dc:creator>umashankarus</dc:creator>
      <dc:date>2017-01-29T08:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Function Usage</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251710#M859394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There seems to be something wrong with the timestamp here, but the remaining are correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="maxval.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/151136_maxval.JPG" style="height: 528px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2017 10:01:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251710#M859394</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-01-29T10:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Function Usage</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251711#M859395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could not open the file&lt;/P&gt;&lt;P&gt;Can you pl post the expressions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2017 17:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251711#M859395</guid>
      <dc:creator>umashankarus</dc:creator>
      <dc:date>2017-01-29T17:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Function Usage</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251712#M859396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try either of the below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(NUM(CREATION_DATE) =&amp;nbsp; Max(TOTAL &amp;lt;DOC_NUMBER&amp;gt; CREATION_DATE)&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;Max(TOTAL &amp;lt;DOC_NUMBER&amp;gt; AGGR(MAX(VERSION),DOC_NUMBER))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(NUM(CREATION_DATE) =&amp;nbsp; Max(TOTAL &amp;lt;DOC_NUMBER&amp;gt; CREATION_DATE)&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;P&gt;FirstSortedValue(TOTAL &amp;lt;DOC_NUMBER&amp;gt; VERSION,-CREATION_DATE)&lt;/P&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;&lt;P&gt;//////////////LOAD SCRIPT////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD DOC_NUMBER, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VERSION, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; timestamp#(trim(CREATION_DATE),'mm/dd/yyyy h:mm:ss TT') as CREATION_DATE, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Aggr - What I want is like this]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;F&gt;&lt;/F&gt;&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//////////////////////////////////////////////////////////&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2017 20:13:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251712#M859396</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-01-29T20:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Function Usage</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251713#M859397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vineeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2017 20:27:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-Function-Usage/m-p/1251713#M859397</guid>
      <dc:creator>umashankarus</dc:creator>
      <dc:date>2017-01-29T20:27:06Z</dc:date>
    </item>
  </channel>
</rss>

