<?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: Help Optimizing an expression with AGGR in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539547#M109085</link>
    <description>&lt;P&gt;I suggest to make the date-checks already within the data-model an refer then within the expressions to these flags, for example with an approach like:&lt;/P&gt;&lt;P&gt;sign(date1 - date2) as flagX&lt;/P&gt;&lt;P&gt;This may need some measurements to bring the various dates together and should be used to consider to rebuild the data-model because link-table approaches may end in a working data-model but from a performance point of view are they usually not the best choice.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Dec 2025 14:04:03 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2025-12-18T14:04:03Z</dc:date>
    <item>
      <title>Help Optimizing an expression with AGGR</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539265#M109047</link>
      <description>&lt;P&gt;Sum(Aggr(max( {&amp;lt;GLaccountCode={'121001','117000'}&amp;gt;}If((YearEndDate&amp;gt;=NetDueDate and [Clearing Date]&amp;gt;YearEndDate and Arrears&amp;gt;0) or AROverdue='Overdue',ARAmountLC)&lt;BR /&gt;),YearFilter,ARKey))&lt;BR /&gt;&lt;BR /&gt;Above is my expression i use on charts and its very slow when there are no filters.&lt;BR /&gt;&lt;BR /&gt;I'm using an As-of table and when i apply filters inside the if-clause, the amount is duplicated(guessing its due to many-to-many joins) and I'm forced to use Max() inside the AGGR() function.&lt;BR /&gt;&lt;BR /&gt;My data model looks like below,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="akash_durai1507_0-1765828964363.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/185828i64CE7FC4864A5A7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="akash_durai1507_0-1765828964363.png" alt="akash_durai1507_0-1765828964363.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;TIA,&lt;/P&gt;</description>
      <pubDate>Mon, 15 Dec 2025 20:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539265#M109047</guid>
      <dc:creator>akash_durai1507</dc:creator>
      <dc:date>2025-12-15T20:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help Optimizing an expression with AGGR</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539273#M109048</link>
      <description>&lt;P&gt;When you built the link table, did you apply the DISTINCT operator?&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 00:15:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539273#M109048</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2025-12-16T00:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help Optimizing an expression with AGGR</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539300#M109053</link>
      <description>&lt;P&gt;Hi Rob!&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;Yes, i did apply distinct operator while loading the link table.&lt;BR /&gt;&lt;BR /&gt;Here is the snapshop of the code,&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="akash_durai1507_1-1765879974119.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/185831iDFE25CAC3A14B3B7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="akash_durai1507_1-1765879974119.png" alt="akash_durai1507_1-1765879974119.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 10:13:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539300#M109053</guid>
      <dc:creator>akash_durai1507</dc:creator>
      <dc:date>2025-12-16T10:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help Optimizing an expression with AGGR</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539341#M109058</link>
      <description>&lt;P&gt;Try this in your load script&amp;nbsp;&lt;/P&gt;&lt;P&gt;AR_Snapshot:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; YearEndDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ARKey,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Max(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (YearEndDate&amp;gt;=NetDueDate&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;and [Clearing Date]&amp;gt;YearEndDate&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;and Arrears&amp;gt;0)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; or AROverdue='Overdue',&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ARAmountLC&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ) as ARAmount_AsOf&lt;/P&gt;&lt;P&gt;Resident AsOfTable&lt;/P&gt;&lt;P&gt;Group By YearEndDate, ARKey;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Dec 2025 16:32:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539341#M109058</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2025-12-16T16:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help Optimizing an expression with AGGR</title>
      <link>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539547#M109085</link>
      <description>&lt;P&gt;I suggest to make the date-checks already within the data-model an refer then within the expressions to these flags, for example with an approach like:&lt;/P&gt;&lt;P&gt;sign(date1 - date2) as flagX&lt;/P&gt;&lt;P&gt;This may need some measurements to bring the various dates together and should be used to consider to rebuild the data-model because link-table approaches may end in a working data-model but from a performance point of view are they usually not the best choice.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Dec 2025 14:04:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-Optimizing-an-expression-with-AGGR/m-p/2539547#M109085</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-12-18T14:04:03Z</dc:date>
    </item>
  </channel>
</rss>

