<?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 Problem with AGGR function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-AGGR-function/m-p/169493#M503793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Mar 2010 10:01:16 GMT</pubDate>
    <dc:creator>sparur</dc:creator>
    <dc:date>2010-03-05T10:01:16Z</dc:date>
    <item>
      <title>Problem with AGGR function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-AGGR-function/m-p/169492#M503792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, colleagues.&lt;/P&gt;&lt;P&gt;I have a problem with the AGGR function . See attached file. There are 2 pivot tables.&lt;/P&gt;&lt;P&gt;1) by Production Line. It's Ok.&lt;/P&gt;&lt;P&gt;2) by Technology. with bug in expression "Base capacity".&lt;/P&gt;&lt;P&gt;Here is an expression:&lt;/P&gt;&lt;P&gt;IF(numsum(sum({&amp;lt;Year=&amp;gt;} TRS * TOC * MLCS), sum({&amp;lt;Year=&amp;gt;} BC)) &amp;lt;&amp;gt; 0,&lt;BR /&gt; IF(sum({&amp;lt;Year=&amp;gt;} BC)=0, sum({&amp;lt;Year=&amp;gt;} TRS * TOC * MLCS / 1000), sum({&amp;lt;Year=&amp;gt;} BC)),&lt;BR /&gt; AGGR(rangesum(before([Capacity (kTn)], (ColumnNo()-(ceil(ColumnNo()/13)-1)*13), 13)) * CAPACITY, ProdLine, PeriodYear))&lt;/P&gt;&lt;P&gt;the problem is that the field of Capacity is set at the level of the production line(see in Data Model). And when we calculate by ProdLine, there is no problem (pivot 1). But when we want to see by technology(pivot 2), then the problem starts here ...&lt;/P&gt;&lt;P&gt;for example, select 'Filled Bar' in Technology filter and then select 2 Production Line: 'CHI FB1' ? 'CHI FB3'&lt;/P&gt;&lt;P&gt;We have Base Capacity (BC) for the 2009 year is 46,1 for CHI FB1 and 25,5 for CHI FB3. so fo Technology Filled Bar we have BC = 71,6 (see in pivot 3).&lt;/P&gt;&lt;P&gt;And now we have to calculate a BC for 'P1 10' (for example)...&lt;/P&gt;&lt;P&gt;Capacity for that period ( 'P1 10') in CHI FB1 = 0,4 (40%), in CHI FB3 = 0,0769 (7,69%) (see in pivot 4 - column with red background)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ProdLine BC Explanation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHI FB1 18,44 (46,1 * 0,4)&lt;/P&gt;&lt;P&gt;CHI FB3 1,96 (25,5 * 0,0769)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so what I want :)...&lt;/P&gt;&lt;P&gt;I want that in pivot by Technology (pivot 2) for that period (P1 10) calculated Base Capacity = 20,4&lt;/P&gt;&lt;P&gt;How I must correct my expression (Base Capacity) in pivot 2 for calculate and see it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Mar 2010 08:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-AGGR-function/m-p/169492#M503792</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2010-03-05T08:34:35Z</dc:date>
    </item>
    <item>
      <title>Problem with AGGR function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-AGGR-function/m-p/169493#M503793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Mar 2010 10:01:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-AGGR-function/m-p/169493#M503793</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2010-03-05T10:01:16Z</dc:date>
    </item>
    <item>
      <title>Problem with AGGR function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-AGGR-function/m-p/169494#M503794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm clear? &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt; tell me please if I do not clearly describe my problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Mar 2010 07:29:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-AGGR-function/m-p/169494#M503794</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2010-03-09T07:29:48Z</dc:date>
    </item>
  </channel>
</rss>

