<?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: Performance tuning - aggregating tables and average values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666661#M728927</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6678"&gt;@Arthur_Fong&lt;/a&gt;&amp;nbsp;, this works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jan 2020 10:00:04 GMT</pubDate>
    <dc:creator>rigosong</dc:creator>
    <dc:date>2020-01-17T10:00:04Z</dc:date>
    <item>
      <title>Performance tuning - aggregating tables and average values</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666620#M728923</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;currently I'm encountering performance issues with one of our QlikView applications, due to the amount of data.&lt;/P&gt;&lt;P&gt;Situation (simplified) - Table with date and value columns:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;01.01.20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1,356&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;01.01.20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2,121&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;01.01.20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1,640&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;01.01.20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1,443&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;02.01.20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1,495&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;02.01.20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1,881&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;User Need: Calculate average value depending on picked date range.&lt;BR /&gt;Eg. user picks date range &lt;STRONG&gt;1.1.20 - 2.1.20&lt;/STRONG&gt; and should get the result &lt;STRONG&gt;1,656.&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get this done with a table and expression is straight forward. Date as Dimension and AVG() Expression for Value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, due to the massive amount of data the Qlikview application takes for ever loading and processing user inputs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My thought was to transform the original tables into already aggregated tables where the values are grouped by date. The table size would be reduced imensly with this.&lt;/P&gt;&lt;P&gt;This idea with the above example:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Avg.Value&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;01.01.20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1,640&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;02.01.20&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1,688&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Problem with this: if the user picks again the date range&amp;nbsp;&lt;STRONG&gt;1.1.20 - 2.1.20 &lt;/STRONG&gt;the result for average value would be&amp;nbsp; &lt;STRONG&gt;1,664 &lt;/STRONG&gt;but it should be&lt;STRONG&gt; 1,656.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, how would you tackle this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666620#M728923</guid>
      <dc:creator>rigosong</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performance tuning - aggregating tables and average values</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666635#M728925</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MC.PNG" style="width: 275px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27064i8A08FBA2E75F9207/image-size/large?v=v2&amp;amp;px=999" role="button" title="MC.PNG" alt="MC.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Raw:
load * inline [
Date	Value
01.01.20	1356
01.01.20	2121
01.01.20	1640
01.01.20	1443
02.01.20	1495
02.01.20	1881
](delimiter is '	');
let vRow=NoOfRows('Raw');

NoConcatenate
Data:
load Date,'$(vRow)'as RowNum,sum(Value) as Value
resident Raw
group by Date;

drop table Raw;
exit script;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 17 Jan 2020 09:07:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666635#M728925</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2020-01-17T09:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Performance tuning - aggregating tables and average values</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666650#M728926</link>
      <description>&lt;P&gt;If the by date aggregated table contains the total value AND the number of entries for the date, you can get the original average by summing the totals and dividing by the sum of the entry counts.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 09:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666650#M728926</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2020-01-17T09:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Performance tuning - aggregating tables and average values</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666661#M728927</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6678"&gt;@Arthur_Fong&lt;/a&gt;&amp;nbsp;, this works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 10:00:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666661#M728927</guid>
      <dc:creator>rigosong</dc:creator>
      <dc:date>2020-01-17T10:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Performance tuning - aggregating tables and average values</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666663#M728928</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14931"&gt;@jonathandienst&lt;/a&gt;&amp;nbsp;! Same approach as &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6678"&gt;@Arthur_Fong&lt;/a&gt;&amp;nbsp;and it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 10:01:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-tuning-aggregating-tables-and-average-values/m-p/1666663#M728928</guid>
      <dc:creator>rigosong</dc:creator>
      <dc:date>2020-01-17T10:01:08Z</dc:date>
    </item>
  </channel>
</rss>

