<?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 Aggr Not Allowed in Script? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-Not-Allowed-in-Script/m-p/1074948#M640501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a new table based on my Resident table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(Invoice_Value) as Monthly_Invoice_Value,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM (IF(Week_Commencing=MAX(Week_Commencing), Invoice_Value,0)) as Week_04&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Invoice_Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group By Customer&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;At the moment it's giving an error as "Nested aggregation not allowed"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I replace max(Week_Commencing) with a fixed value as '21/03/2016' then it works, but Week_Commencing is dynamic so I need to use max(Week_Commencing). Is there any way around this No Nested Aggr rule?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Mar 2016 12:01:05 GMT</pubDate>
    <dc:creator>london1980</dc:creator>
    <dc:date>2016-03-26T12:01:05Z</dc:date>
    <item>
      <title>Nested Aggr Not Allowed in Script?</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-Not-Allowed-in-Script/m-p/1074948#M640501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a new table based on my Resident table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(Invoice_Value) as Monthly_Invoice_Value,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM (IF(Week_Commencing=MAX(Week_Commencing), Invoice_Value,0)) as Week_04&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Invoice_Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group By Customer&lt;/P&gt;&lt;P&gt;*********************************************************&lt;/P&gt;&lt;P&gt;At the moment it's giving an error as "Nested aggregation not allowed"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I replace max(Week_Commencing) with a fixed value as '21/03/2016' then it works, but Week_Commencing is dynamic so I need to use max(Week_Commencing). Is there any way around this No Nested Aggr rule?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;MT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 12:01:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-Not-Allowed-in-Script/m-p/1074948#M640501</guid>
      <dc:creator>london1980</dc:creator>
      <dc:date>2016-03-26T12:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Aggr Not Allowed in Script?</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-Aggr-Not-Allowed-in-Script/m-p/1074949#M640502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should perform a 2-step load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join(&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Invoice_Table)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="line-height: 1.5em;"&gt;MAX(Week_Commencing) as &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MAX_Week_Commencing&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;Resident Invoice_Table&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Group By Customer&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(Invoice_Value) as Monthly_Invoice_Value,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM (IF(Week_Commencing=&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MAX_Week_Commencing&lt;/SPAN&gt;, Invoice_Value,0)) as Week_04&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;Resident Invoice_Table&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;Group By Customer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Mar 2016 12:15:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-Aggr-Not-Allowed-in-Script/m-p/1074949#M640502</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-03-26T12:15:24Z</dc:date>
    </item>
  </channel>
</rss>

