<?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: Fix memory issue - move calcs to script?? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387095#M1167445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Daniel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I combine this with an IF statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Sep 2012 14:10:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-10T14:10:20Z</dc:date>
    <item>
      <title>Fix memory issue - move calcs to script??</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387090#M1167436</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 am working on a series of Straight Table charts which contain a number of regular dimensions, calculated dimensions and expressions. &lt;/P&gt;&lt;P&gt;The problem is that I am facing some serious performance issues at the moment where the app grinds to a halt. When I try to add any additional calculations I am getting an 'Out of object memory' message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would appreciate some guidance as to how to resolve this. My first thought is that I should move these calculations into the script to improve performance - does this sound sensible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is the way to go, then the next challenge that I face is the fact that the various fields that I need to use are on different tables. As I will need to complete my calculations between the 'Load' and 'From' - how do I efficiently bring in fields from other tables for this purpose?&lt;/P&gt;&lt;P&gt;Is there a better way to handle these calculations other then within Load &amp;amp; From?&lt;/P&gt;&lt;P&gt;Should I be using a Join (and dropping original tables?), Lookup or other? What are the main pros/cons?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 13:00:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387090#M1167436</guid>
      <dc:creator />
      <dc:date>2012-09-07T13:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fix memory issue - move calcs to script??</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387091#M1167438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You shouldnt be doing any calculated dimensions (that's almost never the best solution).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post your expressions/calculated dimensions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 16:29:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387091#M1167438</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2012-09-07T16:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fix memory issue - move calcs to script??</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387092#M1167439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the advice. Good to know to avoid calculated dimensions in the future!&lt;/P&gt;&lt;P&gt;Excuse my ignorance, but why are they such a bad choice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As requested, the Expressions are listed below:&lt;/P&gt;&lt;P&gt;count(if(CategoryDesc='Financial' and Open_Clos='Closed', ID, NULL))&lt;/P&gt;&lt;P&gt;sum(if(CategoryDesc='Financial', PercentComp/100, NULL))&lt;/P&gt;&lt;P&gt;count(if(CategoryDesc&amp;lt;&amp;gt;'Financial' and Open_Clos='Closed', ID, NULL))&lt;/P&gt;&lt;P&gt;sum(if(CategoryDesc&amp;lt;&amp;gt;'Financial', PercentComp/100, NULL))&lt;/P&gt;&lt;P&gt;count(if(CategoryDesc='Financial' and Open_Clos='Closed' and PercentComp&amp;lt;&amp;gt;100, 1-(PercentComp/100), NULL))&lt;/P&gt;&lt;P&gt;sum(if(CategoryDesc='Financial' and Open_Clos='Closed' and PercentComp&amp;lt;&amp;gt;100, 1-(PercentCompletion/100), NULL))&lt;/P&gt;&lt;P&gt;count(if(CategoryDesc&amp;lt;&amp;gt;'Financial' and Open_Clos='Closed' and PercentComp&amp;lt;&amp;gt;100, 1-(PercentComp/100), NULL))&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** Plus 9 others (not included) with similar configurations **&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;count(if(CategoryDesc='Financial' and Open_Clos='Closed' and PercentComp=100, sum(FinancialAttained), NULL))&lt;/P&gt;&lt;P&gt;count(isnull(PercentComp))&lt;/P&gt;&lt;P&gt;max(TOTAL &amp;lt;ID&amp;gt; DateOfUpdate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will see from the above that the expressions are done in pairings. I am trying to streamline the code to handle both at the same time, so the pariings should look more like this:&lt;/P&gt;&lt;P&gt;if (BenUpdateExists=1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(BenefitCategoryDesc='Financial',1,0)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(BenefitCategoryDesc='Financial', 1-(PercentCompletion/100), NULL))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**Bonus marks if you can see why this is returning only null results!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have removed all but one calculated dimension minor IF statement which does not appear to be causing any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 17:11:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387092#M1167439</guid>
      <dc:creator />
      <dc:date>2012-09-07T17:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Fix memory issue - move calcs to script??</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387093#M1167441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Calculated dimensions causes QlikView to stop using already generated associations between fields, that's causes a really poor performance. Avoid the IF as well, avoid any calculation if possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;count(if(CategoryDesc='Financial' and Open_Clos='Closed', ID, NULL))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;If you add a "1 AS FLG" in the same table as the ID field you could use an expression like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;sum({&amp;lt;CategoryDesc={'Financial'},Open_Clos={'Closed'}&amp;gt;}FLG)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;That will probably outperform the previous one.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 17:16:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387093#M1167441</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2012-09-07T17:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Fix memory issue - move calcs to script??</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387094#M1167443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use then (calculated dimensions) at times. They seem to work fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2012 13:47:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387094#M1167443</guid>
      <dc:creator>robert99</dc:creator>
      <dc:date>2012-09-08T13:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Fix memory issue - move calcs to script??</title>
      <link>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387095#M1167445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Daniel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I combine this with an IF statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 14:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fix-memory-issue-move-calcs-to-script/m-p/387095#M1167445</guid>
      <dc:creator />
      <dc:date>2012-09-10T14:10:20Z</dc:date>
    </item>
  </channel>
</rss>

