<?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: Interval Match problem (QVW attached) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Interval-Match-problem-QVW-attached/m-p/501253#M688940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeff -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This helped alot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only have one problem. I was hoping the left join would allow me to add fields to the FACT table (ie Ownership_Pct).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I drop the OWNER_DEF table I don't have the Ownership_Pct field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I want only one table in the end: the FACT but with the Ownership_Pct field joined in.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Dec 2013 15:02:04 GMT</pubDate>
    <dc:creator>zagzebski</dc:creator>
    <dc:date>2013-12-02T15:02:04Z</dc:date>
    <item>
      <title>Interval Match problem (QVW attached)</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-problem-QVW-attached/m-p/501251#M688938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two problems with the example Interval Match (attached):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How do I add the additional requirements of needing to join:&lt;/P&gt;&lt;P&gt;a. Entity to the Entity_Fact fields&lt;/P&gt;&lt;P&gt;b Product and the Product_Fact&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally the table would look like this since only three records...as the entitys would have to match, the products would have to match and the service date would have to fall between the Effective and Expiration dates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="692"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="116"&gt;Product_Fact&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="89"&gt;Product&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="76"&gt;Entity_Fact&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="57"&gt;Entity&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="100"&gt;Effective_YearMth&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="106"&gt;Expiration_YearMth&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="67"&gt;ServiceDate&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="81"&gt;Ownership_Pct&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;" width="116"&gt;SMDV&lt;/TD&gt;&lt;TD class="xl67" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="89"&gt;SMDV&lt;/TD&gt;&lt;TD class="xl67" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="76"&gt;DEAN&lt;/TD&gt;&lt;TD class="xl67" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="57"&gt;DEAN&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="100"&gt;200701&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="106"&gt;200712&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="67"&gt;200701&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="81"&gt;0.1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;" width="116"&gt;SMDV&lt;/TD&gt;&lt;TD class="xl67" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="89"&gt;SMDV&lt;/TD&gt;&lt;TD class="xl67" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="76"&gt;DEAN&lt;/TD&gt;&lt;TD class="xl67" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="57"&gt;DEAN&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="100"&gt;200801&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="106"&gt;999912&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="67"&gt;200901&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="81"&gt;0.2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;" width="116"&gt;SNON&lt;/TD&gt;&lt;TD class="xl67" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="89"&gt;SNON&lt;/TD&gt;&lt;TD class="xl67" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="76"&gt;DEAN&lt;/TD&gt;&lt;TD class="xl67" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="57"&gt;DEAN&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="100"&gt;200801&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="106"&gt;201312&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="67"&gt;201001&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;" width="81"&gt;0.3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Secondly, once that works I just want to add the Ownership_Pct column to the FACT table. And drop all the other tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is GREATLY appreciated...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 20:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-problem-QVW-attached/m-p/501251#M688938</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2013-11-27T20:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match problem (QVW attached)</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-problem-QVW-attached/m-p/501252#M688939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at the advanced interval match description in the help file.&amp;nbsp; It explains how to do the very thing that you're talking about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do what you're looking for, try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;OWNER_DEF:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Entity, Product, Effective_YearMth, Expiration_YearMth, Ownership_Pct&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEAN, SMDV, 200701, 200712,&amp;nbsp; 0.10 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEAN, SMDV, 200801, 999912,&amp;nbsp; 0.20 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEAN, SNON, 200801, 201312,&amp;nbsp; 0.30 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEAN, SNON, 200401, 999912,&amp;nbsp; 0.40 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DNON, SMDV, 200001, 999912,&amp;nbsp; 0.50 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEAN, DHPP, 200001, 999912,&amp;nbsp; 0.60 &lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FACT:&lt;/P&gt;
&lt;P&gt;Load * Inline [&lt;/P&gt;
&lt;P&gt;ServiceDate, Entity, Product&lt;/P&gt;
&lt;P&gt;200901, DEAN, SMDV&lt;/P&gt;
&lt;P&gt;200701, DEAN, SMDV&lt;/P&gt;
&lt;P&gt;201001, DEAN, SNON];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Inner Join(OWNER_DEF)&lt;/P&gt;
&lt;P&gt;IntervalMatch([ServiceDate], Entity, Product)&lt;/P&gt;
&lt;P&gt;Load &lt;/P&gt;
&lt;P&gt; Effective_YearMth, &lt;/P&gt;
&lt;P&gt; Expiration_YearMth,&lt;/P&gt;
&lt;P&gt; Entity,&lt;/P&gt;
&lt;P&gt; Product&lt;/P&gt;
&lt;P&gt;Resident &lt;/P&gt;
&lt;P&gt;&amp;nbsp; OWNER_DEF&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join(FACT)&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Entity,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Product,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ServiceDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Ownership_Pct&lt;/P&gt;
&lt;P&gt;Resident&lt;/P&gt;
&lt;P&gt;&amp;nbsp; OWNER_DEF&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table&lt;/P&gt;
&lt;P&gt;&amp;nbsp; OWNER_DEF&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice the extended syntax in the interval match.&amp;nbsp; The first field listed is the "between" value and the last two are other keys to join against.&amp;nbsp; The fields listed in the load statement have to match the ones in the interval statement.&amp;nbsp; You can alias them to match, but it's actually easier if they are already named the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This actually produces 4 rows since your intervals for {Entity:DEAN, Product:SNON} overlap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 20:28:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-problem-QVW-attached/m-p/501252#M688939</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-27T20:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match problem (QVW attached)</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-problem-QVW-attached/m-p/501253#M688940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeff -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This helped alot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only have one problem. I was hoping the left join would allow me to add fields to the FACT table (ie Ownership_Pct).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I drop the OWNER_DEF table I don't have the Ownership_Pct field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I want only one table in the end: the FACT but with the Ownership_Pct field joined in.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Dec 2013 15:02:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-problem-QVW-attached/m-p/501253#M688940</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2013-12-02T15:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match problem (QVW attached)</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-problem-QVW-attached/m-p/501254#M688941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry - I add a small error. Forget my prvious reply. It works perfect!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Dec 2013 15:06:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-problem-QVW-attached/m-p/501254#M688941</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2013-12-02T15:06:50Z</dc:date>
    </item>
  </channel>
</rss>

