<?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: Min/Max aggregated function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668546#M1071880</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 using this in a chart/table with the date as a dimension? If so, you need to include this dimension in your Aggr() function. Like this (assuming the date is a field called [Date]):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max(Aggr(Sum({&amp;lt;Receiver = {'US'}&amp;gt;} [Amount]) - Sum({&amp;lt;Receiver -= {'US'}&amp;gt;} [Amount]), [Time], [Date]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2014 11:10:58 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2014-08-28T11:10:58Z</dc:date>
    <item>
      <title>Min/Max aggregated function</title>
      <link>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668540#M1071874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to find max, min values for netted amounts throughout the day.&lt;/P&gt;&lt;P&gt;For every hour I'm calculating the net value for incoming and outgoing payments, leaving a negative or positive value.&lt;/P&gt;&lt;P&gt;Now I wish to rank these netted flows, for instance the largest positive and negative hourly flow for the selected date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the below, the syntax seems to be OK, but I'm only getting null values in return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;MAX&amp;nbsp; &lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AGGR&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SUM&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&amp;nbsp; {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Receiver&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'US'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Amount] &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )- &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&amp;nbsp; {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Receiver&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; -= {'US'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; ), Time&amp;nbsp; )&amp;nbsp; ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Olle &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 10:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668540#M1071874</guid>
      <dc:creator />
      <dc:date>2014-08-28T10:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Min/Max aggregated function</title>
      <link>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668541#M1071875</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;&lt;/P&gt;&lt;P&gt;Try something like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;MAX&amp;nbsp; &lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;AGGR&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SUM&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Receiver&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'US'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),Time)) - Max(&lt;SPAN style="color: #0000ff;"&gt;AGGR&amp;nbsp; (&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&amp;nbsp; {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Receiver&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; -= {'US'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),Time)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 10:16:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668541#M1071875</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-08-28T10:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Min/Max aggregated function</title>
      <link>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668542#M1071876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max(Aggr(Max({&amp;lt;Receiver = {US'}&amp;gt;}Amount)-Max({&amp;lt;Receiver -= {US'}&amp;gt;}Amount),Time))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 10:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668542#M1071876</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-08-28T10:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Min/Max aggregated function</title>
      <link>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668543#M1071877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tried it and it's giving me the very same results as the below "core" calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Receiver&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'US'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )- &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Receiver&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; -= {'US'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt; text-decoration: underline;"&gt;) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff8000; font-size: 8pt;"&gt;@MAnish,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff8000; font-size: 8pt;"&gt;receiving null values with your code.&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff8000; font-size: 8pt;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff8000; font-size: 8pt;"&gt;//O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 10:56:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668543#M1071877</guid>
      <dc:creator />
      <dc:date>2014-08-28T10:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Min/Max aggregated function</title>
      <link>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668544#M1071878</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;Can you post sample application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 10:58:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668544#M1071878</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-08-28T10:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Min/Max aggregated function</title>
      <link>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668545#M1071879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pls see attached Sample File, I've replaced counterpart names to "THEM" so no need for the -=US.&lt;/P&gt;&lt;P&gt;//O&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 11:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668545#M1071879</guid>
      <dc:creator />
      <dc:date>2014-08-28T11:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Min/Max aggregated function</title>
      <link>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668546#M1071880</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 using this in a chart/table with the date as a dimension? If so, you need to include this dimension in your Aggr() function. Like this (assuming the date is a field called [Date]):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max(Aggr(Sum({&amp;lt;Receiver = {'US'}&amp;gt;} [Amount]) - Sum({&amp;lt;Receiver -= {'US'}&amp;gt;} [Amount]), [Time], [Date]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 11:10:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668546#M1071880</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-08-28T11:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Min/Max aggregated function</title>
      <link>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668547#M1071881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 11:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-Max-aggregated-function/m-p/668547#M1071881</guid>
      <dc:creator />
      <dc:date>2014-08-28T11:42:14Z</dc:date>
    </item>
  </channel>
</rss>

