<?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 Scripting - Group by and where sum &amp;gt; x in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Scripting-Group-by-and-where-sum-gt-x/m-p/86051#M604274</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to move a calculation into my load script for performance reasons but am struggling a little bit with the best way to do so. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is I have a master file with &amp;gt;1m rows of data and I want to count the number of occurrences of a product but only where a sum condition is met. I was able to do this with a two step process of: &lt;/P&gt;&lt;P&gt;1. Create a temporary table using a resident load of the master which sums the product with amount (i.e. consolidates multiple rows into 1 for each product in each year)&lt;/P&gt;&lt;P&gt;2. Create another resident load on this temp table to run a count and use where clause &amp;gt;1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me a new table with the count of products where the amount &amp;gt;1000 for each client, each year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the table in question is vast I am concerned about the performance of multiple loads of the data and was seeking a more elegant solution to perhaps combine the above into one step. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that this could also be accomplished with set analysis in my main dashboard but this was causing very slow performance I believe due to the complexity and size of the actual data model and not this sample. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have included sample QVW and data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 02 Sep 2018 09:12:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-09-02T09:12:58Z</dc:date>
    <item>
      <title>Scripting - Group by and where sum &gt; x</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-Group-by-and-where-sum-gt-x/m-p/86051#M604274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to move a calculation into my load script for performance reasons but am struggling a little bit with the best way to do so. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is I have a master file with &amp;gt;1m rows of data and I want to count the number of occurrences of a product but only where a sum condition is met. I was able to do this with a two step process of: &lt;/P&gt;&lt;P&gt;1. Create a temporary table using a resident load of the master which sums the product with amount (i.e. consolidates multiple rows into 1 for each product in each year)&lt;/P&gt;&lt;P&gt;2. Create another resident load on this temp table to run a count and use where clause &amp;gt;1000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me a new table with the count of products where the amount &amp;gt;1000 for each client, each year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the table in question is vast I am concerned about the performance of multiple loads of the data and was seeking a more elegant solution to perhaps combine the above into one step. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that this could also be accomplished with set analysis in my main dashboard but this was causing very slow performance I believe due to the complexity and size of the actual data model and not this sample. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have included sample QVW and data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2018 09:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-Group-by-and-where-sum-gt-x/m-p/86051#M604274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-02T09:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting - Group by and where sum &gt; x</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-Group-by-and-where-sum-gt-x/m-p/86052#M604275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using a double-load is indeed the correct way to handle this. A million rows should not be a problematic number - this should have no issues running, unless you've got unusually large fields. I do similar things with &amp;gt;10m rows in a QVW that runs once an hour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given that the information is already in-memory, you typically don't need to worry about adding resident loads unless you're in an every-second-counts scenario. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2018 10:36:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-Group-by-and-where-sum-gt-x/m-p/86052#M604275</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2018-09-02T10:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting - Group by and where sum &gt; x</title>
      <link>https://community.qlik.com/t5/QlikView/Scripting-Group-by-and-where-sum-gt-x/m-p/86053#M604276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your comments OR. Glad to know I am on the right track. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2018 07:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Scripting-Group-by-and-where-sum-gt-x/m-p/86053#M604276</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-03T07:35:39Z</dc:date>
    </item>
  </channel>
</rss>

