<?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 Pre-calculating and storing aggregate data via QVD script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pre-calculating-and-storing-aggregate-data-via-QVD-script/m-p/199038#M58134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Everyone,&lt;/P&gt;&lt;P&gt;I have a bit of an 'is this possible' kind of question. Let me set it up for you:&lt;/P&gt;&lt;P&gt;I have two objects, let's call them Customers and Purchases. The Purchases carry the ID of the customers that they're related to.&lt;/P&gt;&lt;P&gt;I'm interested in two measures about this relationship. I want to know the recency, and frequency of the purchase activity for all of my customers. ie: I want to know how many purchases with a fixed time period, and I want to know how many days its been since the last one.&lt;/P&gt;&lt;P&gt;I can do this just fine within an object in the QVD, but it's expensive. For each of the customers I have to aggregate, group, and sum or count. But really, this is a static piece of information that isn't going to change, so... why calculate it over an over again?&lt;/P&gt;&lt;P&gt;can I implement this in the script? Or am I better off summarizing this using a view in SQL?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jan 2010 00:33:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-01T00:33:33Z</dc:date>
    <item>
      <title>Pre-calculating and storing aggregate data via QVD script</title>
      <link>https://community.qlik.com/t5/QlikView/Pre-calculating-and-storing-aggregate-data-via-QVD-script/m-p/199038#M58134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Everyone,&lt;/P&gt;&lt;P&gt;I have a bit of an 'is this possible' kind of question. Let me set it up for you:&lt;/P&gt;&lt;P&gt;I have two objects, let's call them Customers and Purchases. The Purchases carry the ID of the customers that they're related to.&lt;/P&gt;&lt;P&gt;I'm interested in two measures about this relationship. I want to know the recency, and frequency of the purchase activity for all of my customers. ie: I want to know how many purchases with a fixed time period, and I want to know how many days its been since the last one.&lt;/P&gt;&lt;P&gt;I can do this just fine within an object in the QVD, but it's expensive. For each of the customers I have to aggregate, group, and sum or count. But really, this is a static piece of information that isn't going to change, so... why calculate it over an over again?&lt;/P&gt;&lt;P&gt;can I implement this in the script? Or am I better off summarizing this using a view in SQL?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 00:33:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pre-calculating-and-storing-aggregate-data-via-QVD-script/m-p/199038#M58134</guid>
      <dc:creator />
      <dc:date>2010-01-01T00:33:33Z</dc:date>
    </item>
    <item>
      <title>Pre-calculating and storing aggregate data via QVD script</title>
      <link>https://community.qlik.com/t5/QlikView/Pre-calculating-and-storing-aggregate-data-via-QVD-script/m-p/199039#M58135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may create a summary-table and join with the customer-ID, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LOAD&lt;BR /&gt;Customer_ID,&lt;BR /&gt;NOW-MAX(PurchaseDate) AS TimeElapsed,&lt;BR /&gt;COUNT(Purchase_ID) AS Transactions,&lt;BR /&gt;SUM(Purchase) AS Turnover,&lt;BR /&gt;SUM(Purchase) / COUNT(Purchase_ID) AS avrgTurnover,&lt;BR /&gt;...&lt;BR /&gt;RESIDENT&lt;BR /&gt;Purchases&lt;BR /&gt;WHERE&lt;BR /&gt;PurchaseDate &amp;gt; dDateFrom&lt;BR /&gt;GROUP BY&lt;BR /&gt;Customer_ID;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;HTH&lt;BR /&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jan 2010 03:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pre-calculating-and-storing-aggregate-data-via-QVD-script/m-p/199039#M58135</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2010-01-02T03:44:20Z</dc:date>
    </item>
  </channel>
</rss>

