<?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 Aggr() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-function/m-p/576551#M479183</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi QV community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the following expression in a textbox:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((if(sum({$ &amp;lt; [MonthDiff]={[$(vAktuellerMonat)]} &amp;gt;}[Nutzung kummulliert])&amp;gt;=0.9*((sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum12Monate)]} &amp;gt;}[Nutzung kummulliert_1]) +&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum11Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum10Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum9Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum8Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum7Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum6Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum5Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum4Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum3Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum2Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vAktuellerMonat)]} &amp;gt;}[Nutzung kummulliert_1]))/12),1,0)) +&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[MonthDiff]={[$(vAktuellerMonat)]}&amp;gt;}(if(Themenzugriffe_KPI&amp;gt;=0.9*[gl. DS],1,0)))+&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[MonthDiff]={[$(vAktuellerMonat)]}&amp;gt;}UC1_KPI)+&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[MonthDiff]={[$(vAktuellerMonat)]}&amp;gt;}UC2_KPI))/4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i replaced this expression by a variable vSumKum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vSumKum)&amp;nbsp; gives me the value 0 or 0.25 or.0.5 or 0.75 or 1 per month in TEXTBOX depending on the status of the four sum functions above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to Aggregate these values over the last 12 month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried something like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum12Monate)]} &amp;gt;}$(vSumKum)),MonthDiff)&amp;nbsp;&amp;nbsp;&amp;nbsp; but this doesnt work!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somebody any ideas how this formula has to look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Feb 2014 17:11:52 GMT</pubDate>
    <dc:creator>Frank_Hartmann</dc:creator>
    <dc:date>2014-02-12T17:11:52Z</dc:date>
    <item>
      <title>Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function/m-p/576551#M479183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi QV community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the following expression in a textbox:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;((if(sum({$ &amp;lt; [MonthDiff]={[$(vAktuellerMonat)]} &amp;gt;}[Nutzung kummulliert])&amp;gt;=0.9*((sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum12Monate)]} &amp;gt;}[Nutzung kummulliert_1]) +&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum11Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum10Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum9Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum8Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum7Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum6Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum5Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum4Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum3Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum2Monate)]} &amp;gt;}[Nutzung kummulliert_1])+&lt;/P&gt;&lt;P&gt;sum({$ &amp;lt; [MonthDiff]={[$(vAktuellerMonat)]} &amp;gt;}[Nutzung kummulliert_1]))/12),1,0)) +&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[MonthDiff]={[$(vAktuellerMonat)]}&amp;gt;}(if(Themenzugriffe_KPI&amp;gt;=0.9*[gl. DS],1,0)))+&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[MonthDiff]={[$(vAktuellerMonat)]}&amp;gt;}UC1_KPI)+&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[MonthDiff]={[$(vAktuellerMonat)]}&amp;gt;}UC2_KPI))/4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i replaced this expression by a variable vSumKum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vSumKum)&amp;nbsp; gives me the value 0 or 0.25 or.0.5 or 0.75 or 1 per month in TEXTBOX depending on the status of the four sum functions above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to Aggregate these values over the last 12 month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried something like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum12Monate)]} &amp;gt;}$(vSumKum)),MonthDiff)&amp;nbsp;&amp;nbsp;&amp;nbsp; but this doesnt work!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somebody any ideas how this formula has to look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 17:11:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function/m-p/576551#M479183</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2014-02-12T17:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function/m-p/576552#M479184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Franck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the set analysis will be evaluated once only in the chart (and I assume the AGGR also)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 17:46:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function/m-p/576552#M479184</guid>
      <dc:creator />
      <dc:date>2014-02-12T17:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function/m-p/576553#M479185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without getting my head around all of your expression I couldn't say for sure.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I notice that you don't have another aggregation around your Aggr - which is generally the point of using AGGR, this would give you:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: bold;"&gt;=sum(Aggr(sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum12Monate)]} &amp;gt;}$(vSumKum)),MonthDiff))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;That would then give you the result for each month and then tot up the totals.&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, often you need to repeat your set analysis in the outer statement as well as the functions within it:&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-weight: bold;"&gt;=sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: bold;"&gt;{$ &amp;lt; [MonthDiff]={[$(vZeitraum12Monate)]} &amp;gt;}&lt;/SPAN&gt; Aggr(sum({$ &amp;lt; [MonthDiff]={[$(vZeitraum12Monate)]} &amp;gt;}$(vSumKum)),MonthDiff))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Given that you have a sum both inside and outside the AGGR now I may be missing the point of what you are trying to achieve, but hopefully this will point you in the right direction.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;- Steve&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 18:13:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function/m-p/576553#M479185</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2014-02-12T18:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-function/m-p/576554#M479186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here are 3 things that might help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly, using Aggr over something that you have used set analysis over the same dimensions usually causes problems. -You are selecting a specific MonthDiff, but then what to Aggr over all of them. In this case you have to use another sum around the Aggr to get the total of all MonthDiff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, you could use a range in a single set Analysis. Something like this:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[MonthDiff] = {"&amp;lt;=$(=Max(YourMonth))&amp;gt;=$(=Max(YourMonth)-11)"}&amp;gt;} [Nutzung kummulliert_1])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see you calculate all months and /12, but using the above set analysis you can use AVG as the prefix:&lt;/P&gt;&lt;P&gt;avg({&amp;lt;[MonthDiff] = {"&amp;lt;=$(=Max(YourMonth))&amp;gt;=$(=Max(YourMonth)-11)"}&amp;gt;}[Nutzung kummulliert_1])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if it solves your problem, but hopefully it can help somewhat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 06:18:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-function/m-p/576554#M479186</guid>
      <dc:creator>hschultz</dc:creator>
      <dc:date>2014-02-14T06:18:48Z</dc:date>
    </item>
  </channel>
</rss>

