<?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 Help with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis/m-p/347699#M128694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got a Document with 2 tables (Inventory, and Retail)&lt;/P&gt;&lt;P&gt;The inventory table is related to Retail via a column called RetailKey&lt;/P&gt;&lt;P&gt;What i want to calculate is the original retail which is to get the first unit retail of each item and multiply it by sum of quantities &lt;/P&gt;&lt;P&gt;Actually the user has to select an up to date for quantities calculation and another retail date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my expression is as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, verdana, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;sum(aggr(FirstSortedValue({&amp;lt;H_BPDate={"&amp;lt;=$(vRetailDate)"}&amp;gt;}[Unit Retail], -H_BPDate) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, verdana, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;* &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, verdana, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;sum(Total &amp;lt;RetailKey&amp;gt;{&amp;lt;[Transaction Date]={"&amp;lt;=$(vUpToDate)"}&amp;gt;}Quantity) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, verdana, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;,RetailKey))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this expression is put in a pivot table with the following dimensions (Country, Business Unit, Season)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the results are correct but the performance is extremely slow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I enhance the above expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2012 19:21:20 GMT</pubDate>
    <dc:creator>ali_hijazi</dc:creator>
    <dc:date>2012-06-11T19:21:20Z</dc:date>
    <item>
      <title>Help with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-set-analysis/m-p/347699#M128694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got a Document with 2 tables (Inventory, and Retail)&lt;/P&gt;&lt;P&gt;The inventory table is related to Retail via a column called RetailKey&lt;/P&gt;&lt;P&gt;What i want to calculate is the original retail which is to get the first unit retail of each item and multiply it by sum of quantities &lt;/P&gt;&lt;P&gt;Actually the user has to select an up to date for quantities calculation and another retail date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my expression is as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, verdana, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;sum(aggr(FirstSortedValue({&amp;lt;H_BPDate={"&amp;lt;=$(vRetailDate)"}&amp;gt;}[Unit Retail], -H_BPDate) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, verdana, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;* &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, verdana, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;sum(Total &amp;lt;RetailKey&amp;gt;{&amp;lt;[Transaction Date]={"&amp;lt;=$(vUpToDate)"}&amp;gt;}Quantity) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, verdana, sans-serif; font-size: 12px; background-color: #ffffff;"&gt;,RetailKey))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this expression is put in a pivot table with the following dimensions (Country, Business Unit, Season)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the results are correct but the performance is extremely slow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I enhance the above expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 19:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-set-analysis/m-p/347699#M128694</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2012-06-11T19:21:20Z</dc:date>
    </item>
  </channel>
</rss>

