<?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 Nested aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-aggregation/m-p/179662#M503540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to nest aggregation functions for my project demands. I need to nest concat inside sum funcion .&lt;/P&gt;&lt;P&gt;I use aggr function to enable the nesting of aggregation functions.&lt;/P&gt;&lt;P&gt;Here is my code. It is one of expressions in pivot table, where Agent.FullName is a dimension.&lt;/P&gt;&lt;P&gt;=sum(if(ComplexTargets.Areas = aggr(concat( distinct AreasForAgentByDate.AreaCode,'*'),Agent.FullName),ComplexTargets.Target))&lt;/P&gt;&lt;P&gt;concat( distinct AreasForAgentByDate.AreaCode,'*') - returns me the right value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The equality : ComplexTargets.Areas = aggr(concat( distinct AreasForAgentByDate.AreaCode,'*'),Agent.FullName) is works when it is not in outside aggregation function and i checked that there is matching values.&lt;/P&gt;&lt;P&gt;AreasForAgentByDate.AreaCode is connected to the data cloud, whereas ComplexTargets.Areas (ComplexTargets table) is not connected - stand alone table.&lt;/P&gt;&lt;P&gt;I get 0 for all agents, like there is no matching values for anybody.&lt;/P&gt;&lt;P&gt;Do you have any idea what can be the problem ?&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Guy&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jun 2010 08:37:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-06-08T08:37:44Z</dc:date>
    <item>
      <title>Nested aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-aggregation/m-p/179662#M503540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to nest aggregation functions for my project demands. I need to nest concat inside sum funcion .&lt;/P&gt;&lt;P&gt;I use aggr function to enable the nesting of aggregation functions.&lt;/P&gt;&lt;P&gt;Here is my code. It is one of expressions in pivot table, where Agent.FullName is a dimension.&lt;/P&gt;&lt;P&gt;=sum(if(ComplexTargets.Areas = aggr(concat( distinct AreasForAgentByDate.AreaCode,'*'),Agent.FullName),ComplexTargets.Target))&lt;/P&gt;&lt;P&gt;concat( distinct AreasForAgentByDate.AreaCode,'*') - returns me the right value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The equality : ComplexTargets.Areas = aggr(concat( distinct AreasForAgentByDate.AreaCode,'*'),Agent.FullName) is works when it is not in outside aggregation function and i checked that there is matching values.&lt;/P&gt;&lt;P&gt;AreasForAgentByDate.AreaCode is connected to the data cloud, whereas ComplexTargets.Areas (ComplexTargets table) is not connected - stand alone table.&lt;/P&gt;&lt;P&gt;I get 0 for all agents, like there is no matching values for anybody.&lt;/P&gt;&lt;P&gt;Do you have any idea what can be the problem ?&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Guy&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jun 2010 08:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-aggregation/m-p/179662#M503540</guid>
      <dc:creator />
      <dc:date>2010-06-08T08:37:44Z</dc:date>
    </item>
  </channel>
</rss>

