<?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 a third time with AGGR? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregate-a-third-time-with-AGGR/m-p/585544#M217280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Issue was resolved with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(&lt;/P&gt;&lt;P&gt;sum(DOLLAR_COST) /&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (COSTELEMENT_LIST='Product BOM Cost (excl Install kits &amp;amp; UPM)'&amp;nbsp; or COSTELEMENT_LIST = 'Install Kits'&amp;nbsp; or COSTELEMENT_LIST = 'Freight &amp;amp; Duty',sum(TOTAL_KW_NEW_BUILD),sum(TOTAL_KW_BUILD)), &lt;/P&gt;&lt;P&gt;PERIOD_QTR, SUMMARIZE_LEVEL1, SUMMARIZE_LEVEL4, COSTELEMENT_LIST&lt;/P&gt;&lt;P&gt; ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2014 19:43:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-29T19:43:05Z</dc:date>
    <item>
      <title>Aggregate a third time with AGGR?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-a-third-time-with-AGGR/m-p/585541#M217277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="_rp_X"&gt;Hi all,&lt;/P&gt;&lt;DIV class="_rp_Y"&gt; &lt;/DIV&gt;&lt;DIV class="_rp_Y"&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have the following expression that I'm trying to get to calculate correctly over a Summary Level cyclic group (Summary Level 4, Summary Level 1, Cost Element, highest to lowest) in a stacked bar chart. I can get it to show what look like the correct numbers for Cost Element, but it won't do it for the higher level values - Summary Level 4 and Summary Level 1. Below is what I have:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=sum(aggr(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; sum(DOLLAR_COST) / &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; if(COSTELEMENT_LIST = 'Product BOM Cost (excl Install kits &amp;amp; UPM)'&amp;nbsp; or COSTELEMENT_LIST = 'Install Kits' or COSTELEMENT_LIST = 'Freight &amp;amp; Duty', sum(TOTAL_KW_NEW_BUILD), sum(TOTAL_KW_BUILD ) )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; , $(=GetCurrentField(SummaryLevelCyclic)), QTR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; ))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt; background-color: white; font-family: arial,helvetica,sans-serif;"&gt; &lt;BR /&gt;The BUILD numbers are broken out by month and by cost element in the data model. I think I somehow need to aggregate the build numbers to levels higher than cost element in the denominator, but I can't add another SUM() there, and moving the placement of the SUM() within the denominator doesn't seem to work.&amp;nbsp; Does anyone have any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt; background-color: white; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt; background-color: white; font-family: arial,helvetica,sans-serif;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt; background-color: white; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10pt; background-color: white; font-family: arial,helvetica,sans-serif;"&gt;Robin&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 18:58:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-a-third-time-with-AGGR/m-p/585541#M217277</guid>
      <dc:creator />
      <dc:date>2014-01-29T18:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate a third time with AGGR?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-a-third-time-with-AGGR/m-p/585542#M217278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robin, is this a document you can post for review?&amp;nbsp; It looks like your AGGR statement might just need some formatting, but it is hard to tell without data to test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the parentheses as placed, I see only two AGGR levels, $(=GetCurrentField(SummaryLevelCyclic)) and QTR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try adding your third level after QTR (e.g., "...QTR, &lt;EM&gt;next level&lt;/EM&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 19:04:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-a-third-time-with-AGGR/m-p/585542#M217278</guid>
      <dc:creator>greg-anderson</dc:creator>
      <dc:date>2014-01-29T19:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate a third time with AGGR?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-a-third-time-with-AGGR/m-p/585543#M217279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=sum(aggr(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; sum(DOLLAR_COST) / &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; if(COSTELEMENT_LIST = 'Product BOM Cost (excl Install kits &amp;amp; UPM)'&amp;nbsp; or COSTELEMENT_LIST = 'Install Kits' or COSTELEMENT_LIST = 'Freight &amp;amp; Duty', sum(TOTAL_KW_NEW_BUILD), sum(TOTAL_KW_BUILD ) )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; ,'['&amp;amp; $(=GetCurrentField(SummaryLevelCyclic))&amp;amp;']', QTR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; ))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 19:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-a-third-time-with-AGGR/m-p/585543#M217279</guid>
      <dc:creator>iktrayanov</dc:creator>
      <dc:date>2014-01-29T19:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate a third time with AGGR?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregate-a-third-time-with-AGGR/m-p/585544#M217280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Issue was resolved with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(&lt;/P&gt;&lt;P&gt;sum(DOLLAR_COST) /&amp;nbsp; &lt;/P&gt;&lt;P&gt;if (COSTELEMENT_LIST='Product BOM Cost (excl Install kits &amp;amp; UPM)'&amp;nbsp; or COSTELEMENT_LIST = 'Install Kits'&amp;nbsp; or COSTELEMENT_LIST = 'Freight &amp;amp; Duty',sum(TOTAL_KW_NEW_BUILD),sum(TOTAL_KW_BUILD)), &lt;/P&gt;&lt;P&gt;PERIOD_QTR, SUMMARIZE_LEVEL1, SUMMARIZE_LEVEL4, COSTELEMENT_LIST&lt;/P&gt;&lt;P&gt; ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 19:43:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregate-a-third-time-with-AGGR/m-p/585544#M217280</guid>
      <dc:creator />
      <dc:date>2014-01-29T19:43:05Z</dc:date>
    </item>
  </channel>
</rss>

