<?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 Count condition error: nested aggregation not allowed in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-condition-error-nested-aggregation-not-allowed/m-p/1404583#M425504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to count all the departaments that satisfies a condition. This is the condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(( AVG(STANDAR_COST)&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;((NUM(SUM({&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;ID_CLASS={$(Total_Cost)}&amp;gt;}&lt;SPAN style="font-size: 13.3333px;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} BENEFIT) /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM({&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;ID_CLASS&lt;/SPAN&gt;={$(&lt;SPAN style="font-size: 13.3333px;"&gt;Total_Cost&lt;/SPAN&gt;)}&amp;gt;}&lt;SPAN style="font-size: 13.3333px;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} HOURS),'###.##0,00'))&lt;/P&gt;&lt;P&gt;))&amp;lt;0,1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would have to get a number that indicates the number of the departaments that satisfies that condition. So I'm doing something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;=count({&amp;lt;Departament&amp;gt;} if(( AVG(&lt;SPAN style="font-size: 13.3333px;"&gt;{&amp;lt;Departament&amp;gt;}&lt;/SPAN&gt;STANDAR_COST)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;-&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((NUM(SUM(&lt;SPAN style="font-size: 13.3333px;"&gt;{&amp;lt;Departament&amp;gt;}&lt;/SPAN&gt;{&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;ID_CLASS={$(Total_Cost)}&amp;gt;}&lt;SPAN style="font-size: 13.3333px;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} BENEFIT) /&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(&lt;SPAN style="font-size: 13.3333px;"&gt;{&amp;lt;Departament&amp;gt;}&lt;/SPAN&gt;{&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;ID_CLASS&lt;/SPAN&gt;={$(&lt;SPAN style="font-size: 13.3333px;"&gt;Total_Cost&lt;/SPAN&gt;)}&amp;gt;}&lt;SPAN style="font-size: 13.3333px;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} HOURS),'###.##0,00'))&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;))&amp;lt;0,1,0)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;But I get the error: nested aggregation not allowed&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Any idea? Thank you so much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Dec 2017 12:05:43 GMT</pubDate>
    <dc:creator>fonsosurfer</dc:creator>
    <dc:date>2017-12-14T12:05:43Z</dc:date>
    <item>
      <title>Count condition error: nested aggregation not allowed</title>
      <link>https://community.qlik.com/t5/QlikView/Count-condition-error-nested-aggregation-not-allowed/m-p/1404583#M425504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to count all the departaments that satisfies a condition. This is the condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(( AVG(STANDAR_COST)&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;((NUM(SUM({&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;ID_CLASS={$(Total_Cost)}&amp;gt;}&lt;SPAN style="font-size: 13.3333px;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} BENEFIT) /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM({&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;ID_CLASS&lt;/SPAN&gt;={$(&lt;SPAN style="font-size: 13.3333px;"&gt;Total_Cost&lt;/SPAN&gt;)}&amp;gt;}&lt;SPAN style="font-size: 13.3333px;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} HOURS),'###.##0,00'))&lt;/P&gt;&lt;P&gt;))&amp;lt;0,1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would have to get a number that indicates the number of the departaments that satisfies that condition. So I'm doing something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;=count({&amp;lt;Departament&amp;gt;} if(( AVG(&lt;SPAN style="font-size: 13.3333px;"&gt;{&amp;lt;Departament&amp;gt;}&lt;/SPAN&gt;STANDAR_COST)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;-&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;((NUM(SUM(&lt;SPAN style="font-size: 13.3333px;"&gt;{&amp;lt;Departament&amp;gt;}&lt;/SPAN&gt;{&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;ID_CLASS={$(Total_Cost)}&amp;gt;}&lt;SPAN style="font-size: 13.3333px;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} BENEFIT) /&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(&lt;SPAN style="font-size: 13.3333px;"&gt;{&amp;lt;Departament&amp;gt;}&lt;/SPAN&gt;{&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;ID_CLASS&lt;/SPAN&gt;={$(&lt;SPAN style="font-size: 13.3333px;"&gt;Total_Cost&lt;/SPAN&gt;)}&amp;gt;}&lt;SPAN style="font-size: 13.3333px;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} HOURS),'###.##0,00'))&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;))&amp;lt;0,1,0)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;But I get the error: nested aggregation not allowed&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Any idea? Thank you so much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 12:05:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-condition-error-nested-aggregation-not-allowed/m-p/1404583#M425504</guid>
      <dc:creator>fonsosurfer</dc:creator>
      <dc:date>2017-12-14T12:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count condition error: nested aggregation not allowed</title>
      <link>https://community.qlik.com/t5/QlikView/Count-condition-error-nested-aggregation-not-allowed/m-p/1404584#M425505</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;STRONG style="color: #ff0000;"&gt;Sum(Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(( AVG(STANDAR_COST)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;((NUM(SUM({&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;ID_CLASS={$(Total_Cost)}&amp;gt;}&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} BENEFIT) /&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM({&amp;lt;MONTH={$(=NUM($(=MAX({&amp;lt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;ID_CLASS&lt;/SPAN&gt;={$(&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Total_Cost&lt;/SPAN&gt;)}&amp;gt;}&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;MONTH&lt;/SPAN&gt;)),'00'))}&amp;gt;} HOURS),'###.##0,00'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;))&amp;lt;0,1,0)&lt;SPAN style="color: #ff0000;"&gt;,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Departament&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 16:34:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-condition-error-nested-aggregation-not-allowed/m-p/1404584#M425505</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-12-14T16:34:41Z</dc:date>
    </item>
  </channel>
</rss>

