<?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: Aggr color code calculation optimization in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-color-code-calculation-optimization/m-p/1196437#M1251382</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why you need Aggr() function here, from what I know (and AFAIK)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum(total&amp;lt;XYZ, ABC&amp;gt; Aggr(sum({1&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT),XYZ, ABC))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; 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&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Should equal this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Sum({&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless you have missed more dimensions in your Aggr() function. Notice, I removed 1 from the set analysis above. So may be try this:&lt;/P&gt;&lt;P&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(Round(Sum({&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT), .01) &amp;gt; 1, RGB(255,106,106), //red&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(Round(Sum({&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT), .01) = 1, RGB(0,232,116), //green&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;Yellow()))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Oct 2016 09:45:50 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-27T09:45:50Z</dc:date>
    <item>
      <title>Aggr color code calculation optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-color-code-calculation-optimization/m-p/1196436#M1251378</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;How to optimize below expression the best way either in load script or in front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(round(sum(total&amp;lt;XYZ, ABC&amp;gt; Aggr(sum({1&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT),XYZ, ABC)),.01)&amp;gt;1, &lt;/P&gt;&lt;P&gt;RGB(255,106,106), //red&lt;/P&gt;&lt;P&gt;if(round(sum(total&amp;lt;XYZ, ABC&amp;gt; Aggr(sum({1&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT),XYZ, ABC)),.01)=1,&lt;/P&gt;&lt;P&gt; RGB(0,232,116), //green&lt;/P&gt;&lt;P&gt;Yellow()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently its written in chart expression background color expression.&lt;/P&gt;&lt;P&gt;It's taking too long time to load the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Udit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-color-code-calculation-optimization/m-p/1196436#M1251378</guid>
      <dc:creator>udit_kumar_sana</dc:creator>
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr color code calculation optimization</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-color-code-calculation-optimization/m-p/1196437#M1251382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why you need Aggr() function here, from what I know (and AFAIK)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Sum(total&amp;lt;XYZ, ABC&amp;gt; Aggr(sum({1&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT),XYZ, ABC))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; 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&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Should equal this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Sum({&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless you have missed more dimensions in your Aggr() function. Notice, I removed 1 from the set analysis above. So may be try this:&lt;/P&gt;&lt;P&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(Round(Sum({&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT), .01) &amp;gt; 1, RGB(255,106,106), //red&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(Round(Sum({&amp;lt;PQR={0},EFG=p(EFG)&amp;gt;}HEADCOUNT), .01) = 1, RGB(0,232,116), //green&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;Yellow()))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 09:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-color-code-calculation-optimization/m-p/1196437#M1251382</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-27T09:45:50Z</dc:date>
    </item>
  </channel>
</rss>

