<?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 logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Interval-match-logic/m-p/1975337#M1220710</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29266"&gt;@Aurelien_Martinez&lt;/a&gt;&amp;nbsp;for your quick response. I'll validate it with real data today and will get back to you. Thank you so much again!!&lt;/P&gt;</description>
    <pubDate>Wed, 31 Aug 2022 12:48:29 GMT</pubDate>
    <dc:creator>neelamsaroha157</dc:creator>
    <dc:date>2022-08-31T12:48:29Z</dc:date>
    <item>
      <title>Interval match logic</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-match-logic/m-p/1974964#M1220698</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a logic based on which I am trying to come up with the script.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please see the attached excel for sample data &amp;amp; logic.&lt;/P&gt;
&lt;P&gt;Look back 30 days to startDate and see if there has been a MI data in that duration. If yes, Flag 1 else 0. --This part can be achieved by interval match but its creating a cartesian product as the dates are not are the same granularity.&lt;/P&gt;
&lt;P&gt;Additional condition - If there is no MI date between current &amp;amp; previous start date and its still within 30 days of window then it should be flagged as 0.&lt;/P&gt;
&lt;P&gt;Please let me know if you need additional information to help out.&lt;/P&gt;
&lt;P&gt;Thank you for looking into it!!!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 16:16:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-match-logic/m-p/1974964#M1220698</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2022-08-30T16:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Interval match logic</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-match-logic/m-p/1975245#M1220705</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="amartinez35_0-1661939311717.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/87937i26FF1C4C4188811B/image-size/large?v=v2&amp;amp;px=999" role="button" title="amartinez35_0-1661939311717.png" alt="amartinez35_0-1661939311717.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With this script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MI:&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;Date([MI Date], 'DD/MM/YYYY') as [MI Date]&lt;BR /&gt;Inline [&lt;BR /&gt;ID, MI Date&lt;BR /&gt;1, 05/20/2022&lt;BR /&gt;1, 05/01/2022&lt;BR /&gt;1, 04/29/2022&lt;BR /&gt;1, 04/26/2022&lt;BR /&gt;1, 04/25/2022&lt;BR /&gt;1, 04/23/2022&lt;BR /&gt;1, 04/22/2022&lt;BR /&gt;1, 04/16/2022&lt;BR /&gt;1, 04/15/2022&lt;BR /&gt;2, 07/21/2022&lt;BR /&gt;2, 07/20/2022&lt;BR /&gt;3, 03/25/2022&lt;BR /&gt;3, 03/24/2022&lt;BR /&gt;3, 01/13/2022&lt;BR /&gt;3, 01/12/2022&lt;BR /&gt;3, 01/11/2022&lt;BR /&gt;3, 01/10/2022&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;data:&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;Date(StartDate, 'DD/MM/YYYY') as StartDate&lt;BR /&gt;Inline [&lt;BR /&gt;ID, Unique ID, StartDate&lt;BR /&gt;1, 1, 05/30/2022&lt;BR /&gt;1, 1, 05/18/2022&lt;BR /&gt;1, 1, 05/03/2022&lt;BR /&gt;1, 1, 05/01/2022&lt;BR /&gt;1, 1, 02/10/2022&lt;BR /&gt;2, 2, 07/19/2022&lt;BR /&gt;2, 2, 07/21/2022&lt;BR /&gt;3, 3, 01/21/2022&lt;BR /&gt;3, 3, 04/15/2022&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;data_2:&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;StartDate,&lt;BR /&gt;Peek(ID)=ID as TEST,&lt;BR /&gt;If(Peek(ID)=ID,&lt;BR /&gt;Date(Peek(StartDate)+1, 'DD/MM/YYYY'),&lt;BR /&gt;Date(StartDate-30, 'DD/MM/YYYY')&lt;BR /&gt;) as EndDate&lt;BR /&gt;Resident data&lt;BR /&gt;Order By&lt;BR /&gt;ID,&lt;BR /&gt;StartDate asc&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;Drop Table data;&lt;/P&gt;
&lt;P&gt;Left Join(data_2)&lt;BR /&gt;IntervalMatch([MI Date], ID)&lt;BR /&gt;Load&lt;BR /&gt;EndDate,&lt;BR /&gt;StartDate,&lt;BR /&gt;ID&lt;BR /&gt;Resident data_2&lt;BR /&gt;;&lt;BR /&gt;Drop Tables MI;&lt;/P&gt;
&lt;P&gt;data_f:&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;StartDate,&lt;BR /&gt;If(Count([MI Date])&amp;gt;0, 1, 0) as FLAG&lt;BR /&gt;Resident data_2&lt;BR /&gt;Group By&lt;BR /&gt;ID,&lt;BR /&gt;StartDate&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;Drop Table data_2;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 09:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-match-logic/m-p/1975245#M1220705</guid>
      <dc:creator>Aurelien_Martinez</dc:creator>
      <dc:date>2022-08-31T09:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Interval match logic</title>
      <link>https://community.qlik.com/t5/QlikView/Interval-match-logic/m-p/1975337#M1220710</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29266"&gt;@Aurelien_Martinez&lt;/a&gt;&amp;nbsp;for your quick response. I'll validate it with real data today and will get back to you. Thank you so much again!!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 12:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Interval-match-logic/m-p/1975337#M1220710</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2022-08-31T12:48:29Z</dc:date>
    </item>
  </channel>
</rss>

