<?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 IntervalMatch with dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IntervalMatch-with-dates/m-p/1602768#M736806</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I'm new to Qlikview and I'm struggling with the intervalMatch function even though I've been reading many examples here but still I can't apply any of them to my need. I'm trying to match the customer credit score on contract level at the moment of origination of the contract. I have a historical table with the customer scores so I want to match it with the contract start date.&lt;/P&gt;&lt;P&gt;I'm attaching an example with the load inline to see if someone could please help me. So far I created the start and end dates to apply the intervalmatch but I found a problem since sometimes the oldest score is older than the contract start so for these cases I would like to take the oldest score in the customer score table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example, the code and the qvw:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="INTERVALMATCH HELP.JPG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/15503i56430157EDFC34EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="INTERVALMATCH HELP.JPG" alt="INTERVALMATCH HELP.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;TEMP_CREDIT_GRADE:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[ CUSTOMER_CODE,CRR_NOTES, CRR_TIMESTAMP, CRR_RATING&lt;BR /&gt;COREVIEWNO-26115, Bisnode , 05-06-2019, B&lt;BR /&gt;COREVIEWNO-26115, Bisnode , 05-12-2018, C&lt;BR /&gt;COREVIEWNO-26115, Bisnode , 29-11-2016, B&lt;BR /&gt;COREVIEWNO-26115, , 22-09-2016, B&lt;BR /&gt;COREVIEWNO-26115, , 26-02-2010, A&lt;BR /&gt;COREVIEWNO-32746, , 20-03-2019, A&lt;BR /&gt;COREVIEWNO-32746, Bisnode , 29-11-2016, C&lt;BR /&gt;COREVIEWNO-32746, , 19-10-2015, A&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;CREDIT_GRADE:&lt;BR /&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;Date([CRR_TIMESTAMP]) as StartDate,&lt;BR /&gt;if([CRR_TIMESTAMP]&amp;lt; Previous([CRR_TIMESTAMP]),Date(Previous([CRR_TIMESTAMP])-1), Date(today())) as EndDate&lt;BR /&gt;RESIDENT TEMP_CREDIT_GRADE&lt;BR /&gt;ORDER BY [CUSTOMER_CODE],[CRR_TIMESTAMP] DESC;&lt;/P&gt;&lt;P&gt;DROP TABLE TEMP_CREDIT_GRADE;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;CONTRACTS:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[ CUSTOMER_CODE, CONTRACT_ID, LATEST_CUSTOMER_GRADE, CONTRACT_START_DATE,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-23885, B, 15-04-2004,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-32615, B, 26-01-2009,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-33617, B, 22-09-2009,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-33666, B, 30-09-2009,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-34191, B, 26-02-2010,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-39708, B, 10-07-2013,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-41054, B, 31-01-2014,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-43478, B, 11-03-2015,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-44296, B, 08-07-2015,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-44590, B, 18-09-2015,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-44612, B, 21-09-2015,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-45823, B, 07-04-2016,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-46181, B, 27-05-2016,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-46905, B, 22-09-2016,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-57846, B, 28-02-2019,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-58892, B, 28-06-2019,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-44374, A, 03-08-2015,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-45915, A, 21-04-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-46017, A, 04-05-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-46143, A, 24-05-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-46173, A, 26-05-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-46741, A, 26-08-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-48725, A, 19-04-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-48823, A, 03-05-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-48984, A, 29-05-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-49176, A, 23-06-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-49319, A, 06-07-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-49322, A, 07-07-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-54374, A, 27-06-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-54509, A, 03-07-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56105, A, 23-08-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56277, A, 06-09-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56776, A, 30-10-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56826, A, 31-10-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56963, A, 13-11-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-57022, A, 19-11-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-57323, A, 18-12-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-57970, A, 21-03-2019,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-58021, A, 28-03-2019,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-58226, A, 23-04-2019,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-58233, A, 24-04-2019,&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LEFT JOIN&lt;BR /&gt;IntervalMatch(CONTRACT_START_DATE,[CUSTOMER_CODE])&lt;BR /&gt;LOAD StartDate, EndDate,[CRR_RATING]&lt;BR /&gt;RESIDENT CREDIT_GRADE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!!!!!!!!!&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>SaraiMoH</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>IntervalMatch with dates</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-with-dates/m-p/1602768#M736806</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I'm new to Qlikview and I'm struggling with the intervalMatch function even though I've been reading many examples here but still I can't apply any of them to my need. I'm trying to match the customer credit score on contract level at the moment of origination of the contract. I have a historical table with the customer scores so I want to match it with the contract start date.&lt;/P&gt;&lt;P&gt;I'm attaching an example with the load inline to see if someone could please help me. So far I created the start and end dates to apply the intervalmatch but I found a problem since sometimes the oldest score is older than the contract start so for these cases I would like to take the oldest score in the customer score table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example, the code and the qvw:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="INTERVALMATCH HELP.JPG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/15503i56430157EDFC34EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="INTERVALMATCH HELP.JPG" alt="INTERVALMATCH HELP.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;TEMP_CREDIT_GRADE:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[ CUSTOMER_CODE,CRR_NOTES, CRR_TIMESTAMP, CRR_RATING&lt;BR /&gt;COREVIEWNO-26115, Bisnode , 05-06-2019, B&lt;BR /&gt;COREVIEWNO-26115, Bisnode , 05-12-2018, C&lt;BR /&gt;COREVIEWNO-26115, Bisnode , 29-11-2016, B&lt;BR /&gt;COREVIEWNO-26115, , 22-09-2016, B&lt;BR /&gt;COREVIEWNO-26115, , 26-02-2010, A&lt;BR /&gt;COREVIEWNO-32746, , 20-03-2019, A&lt;BR /&gt;COREVIEWNO-32746, Bisnode , 29-11-2016, C&lt;BR /&gt;COREVIEWNO-32746, , 19-10-2015, A&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;CREDIT_GRADE:&lt;BR /&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;Date([CRR_TIMESTAMP]) as StartDate,&lt;BR /&gt;if([CRR_TIMESTAMP]&amp;lt; Previous([CRR_TIMESTAMP]),Date(Previous([CRR_TIMESTAMP])-1), Date(today())) as EndDate&lt;BR /&gt;RESIDENT TEMP_CREDIT_GRADE&lt;BR /&gt;ORDER BY [CUSTOMER_CODE],[CRR_TIMESTAMP] DESC;&lt;/P&gt;&lt;P&gt;DROP TABLE TEMP_CREDIT_GRADE;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;CONTRACTS:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[ CUSTOMER_CODE, CONTRACT_ID, LATEST_CUSTOMER_GRADE, CONTRACT_START_DATE,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-23885, B, 15-04-2004,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-32615, B, 26-01-2009,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-33617, B, 22-09-2009,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-33666, B, 30-09-2009,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-34191, B, 26-02-2010,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-39708, B, 10-07-2013,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-41054, B, 31-01-2014,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-43478, B, 11-03-2015,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-44296, B, 08-07-2015,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-44590, B, 18-09-2015,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-44612, B, 21-09-2015,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-45823, B, 07-04-2016,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-46181, B, 27-05-2016,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-46905, B, 22-09-2016,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-57846, B, 28-02-2019,&lt;BR /&gt;COREVIEWNO-26115, COREVIEWNO-58892, B, 28-06-2019,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-44374, A, 03-08-2015,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-45915, A, 21-04-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-46017, A, 04-05-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-46143, A, 24-05-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-46173, A, 26-05-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-46741, A, 26-08-2016,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-48725, A, 19-04-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-48823, A, 03-05-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-48984, A, 29-05-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-49176, A, 23-06-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-49319, A, 06-07-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-49322, A, 07-07-2017,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-54374, A, 27-06-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-54509, A, 03-07-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56105, A, 23-08-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56277, A, 06-09-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56776, A, 30-10-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56826, A, 31-10-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-56963, A, 13-11-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-57022, A, 19-11-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-57323, A, 18-12-2018,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-57970, A, 21-03-2019,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-58021, A, 28-03-2019,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-58226, A, 23-04-2019,&lt;BR /&gt;COREVIEWNO-32746, COREVIEWNO-58233, A, 24-04-2019,&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LEFT JOIN&lt;BR /&gt;IntervalMatch(CONTRACT_START_DATE,[CUSTOMER_CODE])&lt;BR /&gt;LOAD StartDate, EndDate,[CRR_RATING]&lt;BR /&gt;RESIDENT CREDIT_GRADE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!!!!!!!!!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-with-dates/m-p/1602768#M736806</guid>
      <dc:creator>SaraiMoH</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: IntervalMatch with dates</title>
      <link>https://community.qlik.com/t5/QlikView/IntervalMatch-with-dates/m-p/1610925#M736807</link>
      <description>&lt;P&gt;Here is a Design Blog post you likely did not find:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/IntervalMatch/ba-p/1464547" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/IntervalMatch/ba-p/1464547&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And here is the Help link on it as well, just in case you have not checked things there:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/IntervalMatch.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/IntervalMatch.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/IntervalMatch_(Extended_Syntax).htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/IntervalMatch_(Extended_Syntax).htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 20:42:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IntervalMatch-with-dates/m-p/1610925#M736807</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-08-08T20:42:53Z</dc:date>
    </item>
  </channel>
</rss>

