<?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 *** Need help with Aggr() Expression *** in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-with-Aggr-Expression/m-p/308859#M114025</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;Dear All,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;I am stuck with an expression which works fine when I filter the data and it gives incorrect numbers when I dont filter the data. Here is the expression...&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Dimension :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;&lt;EM&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;ParentID&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Expression :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM style="color: #800080;"&gt;&lt;STRONG&gt;SUM(Aggr( (Unit_Cost) * sum(lCount), ItemId))&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM style="color: #800080;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;This works fine, when I filter on the Field &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;ParentID &lt;/STRONG&gt;&lt;/SPAN&gt;(Which is my only dimension). However, if I dont filter on the &lt;/EM&gt;&lt;EM style="color: #ff0000;"&gt;&lt;STRONG&gt;ParentID &lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;it gives incorrect numbers. I am not sure where is the problem. Unfortunately I cant load the QV document because it contains sensitive information. Can someone please help...?&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;Thanks a ton in advance.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;&lt;STRONG&gt;Cheers - DV&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jul 2011 17:52:28 GMT</pubDate>
    <dc:creator>IAMDV</dc:creator>
    <dc:date>2011-07-26T17:52:28Z</dc:date>
    <item>
      <title>*** Need help with Aggr() Expression ***</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-Aggr-Expression/m-p/308859#M114025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;Dear All,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;I am stuck with an expression which works fine when I filter the data and it gives incorrect numbers when I dont filter the data. Here is the expression...&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Dimension :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;&lt;EM&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;ParentID&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Expression :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM style="color: #800080;"&gt;&lt;STRONG&gt;SUM(Aggr( (Unit_Cost) * sum(lCount), ItemId))&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM style="color: #800080;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;This works fine, when I filter on the Field &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;ParentID &lt;/STRONG&gt;&lt;/SPAN&gt;(Which is my only dimension). However, if I dont filter on the &lt;/EM&gt;&lt;EM style="color: #ff0000;"&gt;&lt;STRONG&gt;ParentID &lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;it gives incorrect numbers. I am not sure where is the problem. Unfortunately I cant load the QV document because it contains sensitive information. Can someone please help...?&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;Thanks a ton in advance.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;&lt;EM&gt;&lt;STRONG&gt;Cheers - DV&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 17:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-Aggr-Expression/m-p/308859#M114025</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-07-26T17:52:28Z</dc:date>
    </item>
  </channel>
</rss>

