<?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 Question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767035#M669067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA document would help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Chinna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2014 01:11:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-11-05T01:11:52Z</dc:date>
    <item>
      <title>Interval Match Question</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767034#M669065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have two tables. One table has columns 'ID' and 'Invoice Date'. Another one has columns 'ID', 'Start Date', 'End Date', and 'Price'. The desired output is 'ID', 'Invoice Date', 'Price'. I know this could be done using interval match but having a hard time figuring out how. Any help is highly appreciated. Attached is sample data for your convenience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 242px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="135"&gt;Product ID&lt;/TD&gt;&lt;TD width="107"&gt;InvoiceDate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: none;"&gt;10/16/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;08/01/2014&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 2:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="460"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="141"&gt;Product ID&lt;/TD&gt;&lt;TD width="110"&gt;Start Date&lt;/TD&gt;&lt;TD width="132"&gt;End Date&lt;/TD&gt;&lt;TD width="77"&gt;Price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;"&gt;06/01/2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-left: none;"&gt;06/30/2014&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;$200 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;07/01/2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;08/30/2014&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;$350 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;09/01/2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;12/31/9999&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;$400 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;06/01/2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;06/30/2014&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;$250 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;07/01/2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;08/30/2014&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;$240 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;09/01/2014&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;12/31/9999&lt;/TD&gt;&lt;TD align="right" class="xl66"&gt;$300 &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Desired Output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="420"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="140"&gt;Product ID&lt;/TD&gt;&lt;TD width="140"&gt;InvoiceDate&lt;/TD&gt;&lt;TD width="140"&gt;Price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-left: none;"&gt;06/02/2014&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;$200 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;07/20/2014&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;$350 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;06/20/2014&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;$250 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;09/26/2014&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;$300 &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 01:05:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767034#M669065</guid>
      <dc:creator />
      <dc:date>2014-11-05T01:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match Question</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767035#M669067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA document would help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Chinna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 01:11:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767035#M669067</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-05T01:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match Question</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767036#M669069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Luck. How to fit in amount is confusing me. I would really appreciate if you can create a quick QVW with attached data and post it back. That will be very helpful in understanding it. Thanks in advance for helping. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 01:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767036#M669069</guid>
      <dc:creator />
      <dc:date>2014-11-05T01:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match Question</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767037#M669070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I started to do the interval match, and the first two IDs work as expected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But then i noticed some duplication in your data that don't match the desired results. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, for 1000E2USdd 16890-000 , you have two intervales for 9/1/2014-&amp;gt; 12/31/9999 with 2 different values. See below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70514_Untitled.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And when i check the desired result it doesn't quite make sense&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70515_Untitled.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How did you associate 9/26/2014 to line 11 and 10/15/2014 to line 14 ??&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 01:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767037#M669070</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-11-05T01:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match Question</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767038#M669071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see what you are saying.Makes sense! I have updated the datasheet and have simplified it a bit. Please use that instead. Thanks for helping &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 05:35:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767038#M669071</guid>
      <dc:creator />
      <dc:date>2014-11-05T05:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Interval Match Question</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767039#M669073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 08:59:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767039#M669073</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-11-05T08:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Interval Match Question</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767040#M669075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok - i still see an unexpected 'desired output' in your spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 2 records with invoice dates below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture2.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70566_Capture2.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To match those 2 records to specific intervals we have the following possible intervals for A and B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture3.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70567_Capture3.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the above&amp;nbsp;&amp;nbsp;&amp;nbsp; ID=A and InvoiceDate=10/16/2014&amp;nbsp; would map to&amp;nbsp;&amp;nbsp;&amp;nbsp; $400&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp; ID=B and InvoiceDate=08/01/2014 would map to&amp;nbsp; 240$&amp;nbsp; .&amp;nbsp; However your expected outcome is this ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture4.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70568_Capture4.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I applied the interval match in QlikView i got the expected result of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70569_Capture1.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you agree with me,&amp;nbsp; below is the load script for this and attached is the QVW. The solution uses the 'extended' interval match syntax to not only match the interval but another identifier as well... in this case ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoices:&lt;/P&gt;&lt;P&gt;LOAD ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(InvoiceDate) as InvoiceDate&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [Table 1]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;StartEnds:&lt;/P&gt;&lt;P&gt;LOAD ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date([Start Date]) as [Start Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date([End Date]) as [End Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Price&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [Table 2]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join IntervalMatch (InvoiceDate,ID) LOAD [Start Date], [End Date],ID Resident StartEnds;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 14:48:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767040#M669075</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2014-11-05T14:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Interval Match Question</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767041#M669077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See also the QlikTech document about it: &lt;A href="https://community.qlik.com/docs/DOC-4310"&gt;IntervalMatch and Slowly Changing Dimensions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 14:28:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-Match-Question/m-p/767041#M669077</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-11-06T14:28:25Z</dc:date>
    </item>
  </channel>
</rss>

