<?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 Set Analysis / IntervalMatch / something else? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-IntervalMatch-something-else/m-p/179239#M501030</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good people,&lt;/P&gt;&lt;P&gt;Kindly your advise on this matter...&lt;/P&gt;&lt;P&gt;Consider the following scenatio:&lt;/P&gt;&lt;P&gt;Inventory table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; ID, Warehouse ID, Artile SKU, Inventory Date, &lt;STRONG&gt;Inventory Date To&lt;/STRONG&gt;, Qty Received, Qty on Stock&lt;BR /&gt; 1, 100, AB, 24-3-2011, 25-mrt, 23, 24&lt;BR /&gt; 2, 100, AB, 25-3-2011, 28-mrt, 1, 25&lt;BR /&gt; 3, 100, AB, 28-3-2011, 1-1-3000, 0, 0&lt;BR /&gt; 4, 100, AC, 1-1-2011, 31-1-2011, 0, 45&lt;BR /&gt; 5, 100, AC, 31-1-2011, 6-2-2011, , 34&lt;BR /&gt; 6, 100, AC, 6-2-2011, 25-2-2011, 23, 57&lt;BR /&gt; 7, 100, AC, 25-2-2011, 1-1-3000, , 56&lt;BR /&gt; 8, 100, AD, 2-1-2011, 11-1-2011, ,&lt;BR /&gt; 9, 101, AD, 11-1-2011, 1-1-3000, ,&lt;BR /&gt; 10, 101, AB, 22-3-2011, 24-mrt, 23, 24&lt;BR /&gt; 11, 101, AB, 24-mrt, 28-3-2011, , 22&lt;BR /&gt; 12, 102, AB, 28-3-2011, 1-1-3000, 2, 24&lt;BR /&gt; 13, 102, AC, 1-1-2011, 31-1-2011, 0, 68&lt;BR /&gt; 14, 102, AE, 2-3-2011, 10-3-2011, 300, 300&lt;BR /&gt; 15, 102, AE, 10-3-2011, 17-3-2011, 50, 350&lt;BR /&gt; 16, 102, AE, 17-3-2011, 18-3-2011, , 200&lt;BR /&gt; 17, 102, AE, 18-3-2011, 1-1-3000, 20, 2020&lt;BR /&gt;];&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt; - Row ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Store ID&lt;/STRONG&gt; - Store Unique ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Article SKU&lt;/STRONG&gt; - Article P\N&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inventory Date&lt;/STRONG&gt; - Date&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inventory Date To&lt;/STRONG&gt; - This row is valid until&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Qty Received&lt;/STRONG&gt; - Number of articles received&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Qty on Stock&lt;/STRONG&gt; - Number of article on stock (To date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This table is afterwards linked through link table (star scheme) to the following tables:&lt;/P&gt;&lt;P&gt;- Articles (Dimension)&lt;/P&gt;&lt;P&gt;- MasterCalendar (Dimension)&lt;/P&gt;&lt;P&gt;- Sales (Transaction)&lt;/P&gt;&lt;P&gt;- Warehouse&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3925_sourceID:3925" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to achieve is:&lt;/P&gt;&lt;P&gt;- current stock level (to date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I tried using set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;&lt;BR /&gt;sum(1{&amp;lt;&lt;BR /&gt; [Inventory Date]= {'&amp;lt;=$(=Date((Max(Date))))'},&lt;BR /&gt; [&lt;STRONG&gt;Inventory Date To&lt;/STRONG&gt;]= {'&amp;gt;$(=Date((Max(Date))))'}&lt;BR /&gt; &amp;gt;} [&lt;STRONG&gt;Qty on Stock&lt;/STRONG&gt;])&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This gave the desired results but using 1 qualifier means also all other selections in the chart are disregarded.&lt;/P&gt;&lt;P&gt;2. This seems like classic case for extended Intervalmatch, but i couldn't get it to work and eitherway i'm afraid it will the sheer load of records will overload the server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Cutting the MasterCalendar from the data model is one way, but also means i would have to implement a set analysis expression for every measure in the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea's?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Mar 2011 14:25:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-24T14:25:05Z</dc:date>
    <item>
      <title>Set Analysis / IntervalMatch / something else?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-IntervalMatch-something-else/m-p/179239#M501030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good people,&lt;/P&gt;&lt;P&gt;Kindly your advise on this matter...&lt;/P&gt;&lt;P&gt;Consider the following scenatio:&lt;/P&gt;&lt;P&gt;Inventory table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; ID, Warehouse ID, Artile SKU, Inventory Date, &lt;STRONG&gt;Inventory Date To&lt;/STRONG&gt;, Qty Received, Qty on Stock&lt;BR /&gt; 1, 100, AB, 24-3-2011, 25-mrt, 23, 24&lt;BR /&gt; 2, 100, AB, 25-3-2011, 28-mrt, 1, 25&lt;BR /&gt; 3, 100, AB, 28-3-2011, 1-1-3000, 0, 0&lt;BR /&gt; 4, 100, AC, 1-1-2011, 31-1-2011, 0, 45&lt;BR /&gt; 5, 100, AC, 31-1-2011, 6-2-2011, , 34&lt;BR /&gt; 6, 100, AC, 6-2-2011, 25-2-2011, 23, 57&lt;BR /&gt; 7, 100, AC, 25-2-2011, 1-1-3000, , 56&lt;BR /&gt; 8, 100, AD, 2-1-2011, 11-1-2011, ,&lt;BR /&gt; 9, 101, AD, 11-1-2011, 1-1-3000, ,&lt;BR /&gt; 10, 101, AB, 22-3-2011, 24-mrt, 23, 24&lt;BR /&gt; 11, 101, AB, 24-mrt, 28-3-2011, , 22&lt;BR /&gt; 12, 102, AB, 28-3-2011, 1-1-3000, 2, 24&lt;BR /&gt; 13, 102, AC, 1-1-2011, 31-1-2011, 0, 68&lt;BR /&gt; 14, 102, AE, 2-3-2011, 10-3-2011, 300, 300&lt;BR /&gt; 15, 102, AE, 10-3-2011, 17-3-2011, 50, 350&lt;BR /&gt; 16, 102, AE, 17-3-2011, 18-3-2011, , 200&lt;BR /&gt; 17, 102, AE, 18-3-2011, 1-1-3000, 20, 2020&lt;BR /&gt;];&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt; - Row ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Store ID&lt;/STRONG&gt; - Store Unique ID,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Article SKU&lt;/STRONG&gt; - Article P\N&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inventory Date&lt;/STRONG&gt; - Date&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inventory Date To&lt;/STRONG&gt; - This row is valid until&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Qty Received&lt;/STRONG&gt; - Number of articles received&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Qty on Stock&lt;/STRONG&gt; - Number of article on stock (To date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This table is afterwards linked through link table (star scheme) to the following tables:&lt;/P&gt;&lt;P&gt;- Articles (Dimension)&lt;/P&gt;&lt;P&gt;- MasterCalendar (Dimension)&lt;/P&gt;&lt;P&gt;- Sales (Transaction)&lt;/P&gt;&lt;P&gt;- Warehouse&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3925_sourceID:3925" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to achieve is:&lt;/P&gt;&lt;P&gt;- current stock level (to date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I tried using set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;&lt;BR /&gt;sum(1{&amp;lt;&lt;BR /&gt; [Inventory Date]= {'&amp;lt;=$(=Date((Max(Date))))'},&lt;BR /&gt; [&lt;STRONG&gt;Inventory Date To&lt;/STRONG&gt;]= {'&amp;gt;$(=Date((Max(Date))))'}&lt;BR /&gt; &amp;gt;} [&lt;STRONG&gt;Qty on Stock&lt;/STRONG&gt;])&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This gave the desired results but using 1 qualifier means also all other selections in the chart are disregarded.&lt;/P&gt;&lt;P&gt;2. This seems like classic case for extended Intervalmatch, but i couldn't get it to work and eitherway i'm afraid it will the sheer load of records will overload the server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Cutting the MasterCalendar from the data model is one way, but also means i would have to implement a set analysis expression for every measure in the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea's?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dror&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 14:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-IntervalMatch-something-else/m-p/179239#M501030</guid>
      <dc:creator />
      <dc:date>2011-03-24T14:25:05Z</dc:date>
    </item>
  </channel>
</rss>

