<?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 $ Expansion Performance in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expansion-Performance/m-p/170439#M40863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;First let me thank you for detailed explanation. I totally understand that the above post is very old. However, I am very keen to know if you had got chance to work on the Macro to measure the performance. Any direction will be greatly appreciated.&lt;/P&gt;&lt;P&gt;Many thanks in anticipation.&lt;/P&gt;&lt;P&gt;Cheers - DV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2011 11:09:14 GMT</pubDate>
    <dc:creator>IAMDV</dc:creator>
    <dc:date>2011-04-05T11:09:14Z</dc:date>
    <item>
      <title>$ Expansion Performance</title>
      <link>https://community.qlik.com/t5/QlikView/Expansion-Performance/m-p/170437#M40861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am interested in your experience with the performency of $ expansion.&lt;/P&gt;&lt;P&gt;I have a created s set um formulas which I use frequently in my system.&lt;BR /&gt;Too bad, the formulas differ slightly, esp. in the usage of the set-analysis.&lt;/P&gt;&lt;P&gt;No problem, I created variables which hold the formula, and I pass the necessary set-analysis parameters at run time.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Normally the function in an expression would be like this: =Sum({&amp;lt;Year={2009}&amp;gt;} MyField)&lt;/P&gt;&lt;P&gt;I created a variable 'calcSUM' as '=Sum({$1} MyField)'.&lt;BR /&gt;In the expressions I use =$(calcSUM(&amp;lt;Year={2009}&amp;gt;))).&lt;/P&gt;&lt;P&gt;This works great - I even use nested 'functions' by nesting $ expansion (e.g. to keep the variable name flexible).&lt;/P&gt;&lt;P&gt;But I wonder about performance:&lt;BR /&gt;How fast is $ expansion?&lt;BR /&gt;How often is it done, when I use it in an expression (i.e. once per pivot-table, or for every row/column?)&lt;/P&gt;&lt;P&gt;What is your experience?&lt;BR /&gt;Thank you,&lt;BR /&gt;Thilo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Aug 2009 16:02:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expansion-Performance/m-p/170437#M40861</guid>
      <dc:creator />
      <dc:date>2009-08-30T16:02:35Z</dc:date>
    </item>
    <item>
      <title>$ Expansion Performance</title>
      <link>https://community.qlik.com/t5/QlikView/Expansion-Performance/m-p/170438#M40862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have experience with this personally. From a naive "how I would probably design it" point of view, I wouldn't expect there to be more than a fraction of a percentage point difference in speed. I would just do the expansions, then I would execute the expanded formula across all rows. Doing the expansions should take almost no time compared to executing the expanded formulas across all rows. So I wouldn't expect the expansions to cause any performance problems.&lt;/P&gt;&lt;P&gt;That said, I have HEARD that nested expansions DO cause performance problems. Which to me suggests that QlikView might be doing it for every row/column as you asked.&lt;/P&gt;&lt;P&gt;What you can do is test the performance for yourself. On one new tab, copy your chart with the nested $ expansions. On another tab, make the same chart with the fully-expanded expressions. Make sure that QlikView doesn't open to any tab with any copy of the chart. Close and reopen QlikView to make sure nothing is buffered. Click one of your new tabs. Go to settings, document properties, and check the CalcTime of the chart. Close it down and repeat with the other tab. Do it a few times to make sure your results are statistically-significant.&lt;/P&gt;&lt;P&gt;However, I should also give you a warning from a private communication with a senior support technician at QlikView:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;"First, one might want to point out that the CalcTime numbers should be used with caution, as they might be very cumulative. Therefore, we've made our tests on your data (in 10, 100 and 500 million batches; the numbers below are in 500m) using a macro which in a simple way records the "true" calculation time, and also the full CPU core time spent, using ActiveDocument.GetApplication.GetElapsedMilliseconds and ActiveDocument.GetApplication.GetCpuMilliseconds. With these values one can also get a ratio of the CPU core efficiency (total cpu time / elapsed time) , which has been one of the issues (not included here)."&lt;/P&gt;&lt;P&gt;So if you want to be certain that your performance numbers are accurate, you're going to need to write some macro code. I haven't fiddled with that yet myself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 01:17:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expansion-Performance/m-p/170438#M40862</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-01T01:17:49Z</dc:date>
    </item>
    <item>
      <title>$ Expansion Performance</title>
      <link>https://community.qlik.com/t5/QlikView/Expansion-Performance/m-p/170439#M40863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;First let me thank you for detailed explanation. I totally understand that the above post is very old. However, I am very keen to know if you had got chance to work on the Macro to measure the performance. Any direction will be greatly appreciated.&lt;/P&gt;&lt;P&gt;Many thanks in anticipation.&lt;/P&gt;&lt;P&gt;Cheers - DV&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 11:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expansion-Performance/m-p/170439#M40863</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-04-05T11:09:14Z</dc:date>
    </item>
    <item>
      <title>$ Expansion Performance</title>
      <link>https://community.qlik.com/t5/QlikView/Expansion-Performance/m-p/170440#M40864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, I never coded a macro to more accurately measure performance. I really should put that on my list of things to do. I don't think about it when I don't have anything to measure, and when I do have something to measure, I tend to be in too much of a rush to try to figure out how to do it correctly. I'm swamped at work though, so it could be a while even if I do get to it some time.&lt;/P&gt;&lt;P&gt;If you want to do it yourself, here's my guess on how you'd do it:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;start with the chart you want to measure hidden&lt;BR /&gt;e1 = elapsed milliseconds&lt;BR /&gt;c1 = CPU milliseconds&lt;BR /&gt;unhide the chart&lt;BR /&gt;wait for idle&lt;BR /&gt;c2 = CPU milliseconds&lt;BR /&gt;e2 = elapsed milliseconds&lt;BR /&gt;set a variable to c2 - c1&lt;BR /&gt;set a variable to e2 - e1&lt;/P&gt;&lt;P&gt;For testing, I'd try out some really slow charts and see how the elapsed time compares to checking the clock. For CPU, I'd do the same, but tracking CPU % in task manager and estimating the average during the time the chart calculates. Multiply by the elapsed time, and you should get something close to the elapsed CPU. I'd also compare elapsed time to the reported calc time for the chart, and again, they should be close as long as there's nothing else going on with the tab.&lt;/P&gt;&lt;P&gt;If you get the macro working, please post it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 17:47:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expansion-Performance/m-p/170440#M40864</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-04-05T17:47:22Z</dc:date>
    </item>
  </channel>
</rss>

