<?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 an aggr function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-an-aggr-function/m-p/1003762#M341054</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Within a table which contained the detail-dimensions you didn't need an aggr-function - they are only useful if you have a consolidated view and wanted to know the aggregation of a calculation on lower dimensions and then you would need sum(aggr(sum for this and not max(aggr(sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your table you need more something like this: sum(TOTAL &amp;lt;Year&amp;gt; Value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2967"&gt;AGGR...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2980"&gt;When should the Aggr() function NOT be used?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Dec 2015 16:29:21 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2015-12-30T16:29:21Z</dc:date>
    <item>
      <title>Aggregate an aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-an-aggr-function/m-p/1003761#M341053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing a problem. I have the following table (see below), with Person ID, Event ID, Date, Event Category (A-L), Value per event and:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to calculate the value spent per person (since ever) -&amp;gt; that's fine, using an aggr function with person ID (spent = 1 means the person spent some money in that event).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=max(aggr( sum({&amp;lt; [Spent]={1}&amp;gt;}[Value], [Person ID]))&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;Then I want to calculate the value spent per person per year (having a certain year selected, I want to know how much each person spent for example in 2013). -&amp;gt; I have to aggregate person ID and year.&lt;/P&gt;&lt;P&gt;I'm using this formula: &lt;/P&gt;&lt;P&gt;=max(aggr(max(aggr(&lt;/P&gt;&lt;P&gt;sum({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;[Spent]={1}&lt;/SPAN&gt; &amp;gt;}[Value])&lt;/P&gt;&lt;P&gt;, [Person ID])), Year))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it &lt;SPAN style="font-size: 13.3333px;"&gt;only returns the person who spent most each year, as shown in the picture.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And afterwards I would like to calculate the value spent per person per month (having a certain year and month selected, I want to know how much each person spent for example in January 2015). -&amp;gt; I have to aggregate person ID, year and Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody give me some ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Inês &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 15:01:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-an-aggr-function/m-p/1003761#M341053</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-12-30T15:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate an aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-an-aggr-function/m-p/1003762#M341054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Within a table which contained the detail-dimensions you didn't need an aggr-function - they are only useful if you have a consolidated view and wanted to know the aggregation of a calculation on lower dimensions and then you would need sum(aggr(sum for this and not max(aggr(sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your table you need more something like this: sum(TOTAL &amp;lt;Year&amp;gt; Value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2967"&gt;AGGR...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2980"&gt;When should the Aggr() function NOT be used?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 16:29:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-an-aggr-function/m-p/1003762#M341054</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-12-30T16:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate an aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-an-aggr-function/m-p/1003763#M341055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for your reply. Unfortunately, what you are saying does not work (because I need set analysis to say spent = 1). &lt;/P&gt;&lt;P&gt;If I take out the aggr function, I get the sum for each row, which means that value per event = value spent per person (since ever). Each row returns a different value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 16:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-an-aggr-function/m-p/1003763#M341055</guid>
      <dc:creator>inescastelhano</dc:creator>
      <dc:date>2015-12-30T16:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate an aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-an-aggr-function/m-p/1003764#M341056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't meant to remove the set analysis conditions - this was only for reasons to simplify the logic that you rather need an expression-extension to TOTAL instead to use an aggr-wrapping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 17:49:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-an-aggr-function/m-p/1003764#M341056</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-12-30T17:49:32Z</dc:date>
    </item>
  </channel>
</rss>

