<?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 Expression on load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247986#M500095</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erich, by the way, its Rogério! (no prob)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the table is very big, and Im trying to avoid future performance problems.&lt;/P&gt;&lt;P&gt;And I think that with expressions, the document load will be more optimized&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If nobody else has another idea, I think i'll to use this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rogério Faria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 May 2011 02:09:37 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-28T02:09:37Z</dc:date>
    <item>
      <title>Expression on load script</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247984#M500093</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 think my problem is simple, but I couldn't solve it.&lt;/P&gt;&lt;P&gt;On my load script, I have a memory table "OP_Cost" like this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OP_Cost:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yearOP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; monthOP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dept,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cost; // from ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Ok, now I have the table "Performance" that is &lt;STRONG&gt;not &lt;/STRONG&gt;associated with "OP_Cost":&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Performance:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yearP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; monthP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum( {$&amp;lt;Dept={'Finance'}, yearOP={yearP}, monthOP={monthP}&amp;gt;} OP_Cost.Cost),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Target; // from ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My doubt is how can I write the expression (in red), so I can get a sum for field "Cost", filtering the Dept, yearOP and monthOP.&lt;/P&gt;&lt;P&gt;Not necessary must be an expression. If not, what else can I do ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rogério Faria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2011 18:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247984#M500093</guid>
      <dc:creator />
      <dc:date>2011-05-27T18:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Expression on load script</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247985#M500094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Rogério. I don't think it is possible to do something like this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to create a temporary table and use left joint to get apply the values you want. &lt;/P&gt;&lt;P&gt;I think that, in your case, you would have something like this: &lt;/P&gt;&lt;P&gt;//AFTER OP_COST&lt;/P&gt;&lt;P&gt;Performance:&lt;/P&gt;&lt;P&gt;Load yearP, monthP, Target&lt;/P&gt;&lt;P&gt;from ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tempPerformance:&lt;/P&gt;&lt;P&gt;Load yearOp as YearP, monthOP as monthP,&amp;nbsp; sum(Cost)&lt;/P&gt;&lt;P&gt;resident OP_Cost&lt;/P&gt;&lt;P&gt;where Dept = 'Finance' &lt;/P&gt;&lt;P&gt;group by yearOp, monthOp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (Performance)&lt;/P&gt;&lt;P&gt;load * resident tempPerformance;&lt;/P&gt;&lt;P&gt;drop table tempPerformance; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably need to correct something in my code before using it...&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;It's just to give an idea! &lt;/P&gt;&lt;P&gt;Hope it helps &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: Sorry... just corrected the name! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2011 23:52:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247985#M500094</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-27T23:52:40Z</dc:date>
    </item>
    <item>
      <title>Expression on load script</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247986#M500095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erich, by the way, its Rogério! (no prob)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the table is very big, and Im trying to avoid future performance problems.&lt;/P&gt;&lt;P&gt;And I think that with expressions, the document load will be more optimized&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If nobody else has another idea, I think i'll to use this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rogério Faria&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 May 2011 02:09:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247986#M500095</guid>
      <dc:creator />
      <dc:date>2011-05-28T02:09:37Z</dc:date>
    </item>
    <item>
      <title>Expression on load script</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247987#M500096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can, aggregate the target performance in the database (or data warehouse) prior to loading.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 May 2011 16:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247987#M500096</guid>
      <dc:creator />
      <dc:date>2011-05-28T16:15:37Z</dc:date>
    </item>
    <item>
      <title>Expression on load script</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247988#M500097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Rogério. &lt;/P&gt;&lt;P&gt;You can try to remove on step: &lt;/P&gt;&lt;P&gt;//AFTER OP_COST&lt;/P&gt;&lt;P&gt;Performance:&lt;/P&gt;&lt;P&gt;Load yearP, monthP, Target&lt;/P&gt;&lt;P&gt;from ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (Performance)&lt;/P&gt;&lt;P&gt;Load yearOp as YearP, monthOP as monthP,&amp;nbsp; sum(Cost)&lt;/P&gt;&lt;P&gt;resident OP_Cost&lt;/P&gt;&lt;P&gt;where Dept = 'Finance' &lt;/P&gt;&lt;P&gt;group by yearOp, monthOp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to know alternatives as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2011 05:18:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247988#M500097</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-30T05:18:51Z</dc:date>
    </item>
    <item>
      <title>Expression on load script</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247989#M500098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Try this &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Performance:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yearP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; monthP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Target;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OP_Cost:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; load &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; yearop,monthop,,sum(cost)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; from&amp;nbsp; .. &lt;/P&gt;&lt;P&gt;where exists(yearP,yearop)&lt;/P&gt;&lt;P&gt;and exists(monthP,monthop)&lt;/P&gt;&lt;P&gt;and Dept='Finanace'&lt;/P&gt;&lt;P&gt;group by yearop,monthop;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can rename this table to someother name i just did this in the original table &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2011 06:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247989#M500098</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2011-05-30T06:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Expression on load script</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247990#M500099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, thanks for all the replies. All of them helped me somehow.&lt;/P&gt;&lt;P&gt;But, after some tests, if decided to do it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote" style="background-color: #ffffff; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 2px; font-size: 12px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; quotes: none; border-top-color: #eeeeee; border-right-color: #eeeeee; border-bottom-color: #eeeeee; border-left-color: #cccccc; overflow-x: auto; overflow-y: auto; background-position: repeat repeat; border-style: solid; padding: 10px;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;OP_Cost:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yearOP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; monthOP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dept,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cost,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 as Target; // from ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;Concatenate(OP_Cost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yearP as YearOP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; monthP as monthOP,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dept,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 as Cost,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Target; // from ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like this, I only insert rows in the table, and the loading process finishes quickly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 18:04:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-on-load-script/m-p/247990#M500099</guid>
      <dc:creator />
      <dc:date>2011-06-06T18:04:33Z</dc:date>
    </item>
  </channel>
</rss>

