<?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: Overlap dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695818#M725588</link>
    <description>&lt;P&gt;Thanks Ruben, It seems working fine!&lt;/P&gt;&lt;P&gt;but, below case is not working, how to compare with below scenario?&lt;/P&gt;&lt;P&gt;If we have both same dates, that should be overlap - have written firstdate=Peek(firstdate) is not working for this ??&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 22 Apr 2020 17:31:57 GMT</pubDate>
    <dc:creator>paulwalker</dc:creator>
    <dc:date>2020-04-22T17:31:57Z</dc:date>
    <item>
      <title>Overlap dates</title>
      <link>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695641#M725586</link>
      <description>&lt;P&gt;Hi Community&lt;/P&gt;&lt;P&gt;I have to create flag between dates depends on Category, let say Category A has two records&lt;/P&gt;&lt;P&gt;First date and Last date here dates are over lapped -&amp;nbsp;&lt;/P&gt;&lt;P&gt;First Record has:&amp;nbsp; First Date = 4/22/2017&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Date = 4/22/2020 -&amp;nbsp; here between data 2017,2018,2019 and 2020&lt;/P&gt;&lt;P&gt;Second record start and date date are in between 2019, thus it has covered already in first records (means these two records are in overlapped - so my flag should be overlap)&lt;/P&gt;&lt;TABLE width="297px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="71.1111px" height="23px"&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="64.4445px" height="23px"&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="77.7778px" height="23px"&gt;&lt;STRONG&gt;first date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="85.9259px" height="23px"&gt;&lt;STRONG&gt;End date&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="71.1111px" height="23px"&gt;A&lt;/TD&gt;&lt;TD width="64.4445px" height="23px"&gt;A1&lt;/TD&gt;&lt;TD width="77.7778px" height="23px"&gt;4/22/2017&lt;/TD&gt;&lt;TD width="85.9259px" height="23px"&gt;4/22/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="71.1111px" height="23px"&gt;A&lt;/TD&gt;&lt;TD width="64.4445px" height="23px"&gt;A2&lt;/TD&gt;&lt;TD width="77.7778px" height="23px"&gt;1/23/2019&lt;/TD&gt;&lt;TD width="85.9259px" height="23px"&gt;12/31/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="71.1111px" height="23px"&gt;B&lt;/TD&gt;&lt;TD width="64.4445px" height="23px"&gt;B1&lt;/TD&gt;&lt;TD width="77.7778px" height="23px"&gt;5/20/2020&lt;/TD&gt;&lt;TD width="85.9259px" height="23px"&gt;7/22/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you understand!&lt;/P&gt;&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:48:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695641#M725586</guid>
      <dc:creator>paulwalker</dc:creator>
      <dc:date>2024-11-16T00:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Overlap dates</title>
      <link>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695687#M725587</link>
      <description>&lt;P&gt;Hi Pauls, you can do load sorted by category and start date, and&amp;nbsp; use Peek() to check if start date is higher than previous end date, something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOAD
  *,
  If(Category=Peek(Category), 0, 1) as flagFirstDate,
  If(Category=Peek(Category) and [first date]&amp;lt;Peek([End date]), 'Overlap', 'NO') as OutColumn
Resident Data
Order by Category, [first date];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And probably you will need another load in opposite order of dates to fill the first date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOAD
  // Fields,
  If(flagFirstDate and Category=Peek(Category) and [End date]&amp;gt;Peek([first date]), 'Overlap', OutColumn) as OutColumn
Resident Data
Order by Category, [first date] desc;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 11:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695687#M725587</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-04-22T11:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Overlap dates</title>
      <link>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695818#M725588</link>
      <description>&lt;P&gt;Thanks Ruben, It seems working fine!&lt;/P&gt;&lt;P&gt;but, below case is not working, how to compare with below scenario?&lt;/P&gt;&lt;P&gt;If we have both same dates, that should be overlap - have written firstdate=Peek(firstdate) is not working for this ??&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 17:31:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695818#M725588</guid>
      <dc:creator>paulwalker</dc:creator>
      <dc:date>2020-04-22T17:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Overlap dates</title>
      <link>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695823#M725589</link>
      <description>&lt;P&gt;Hi, I don't see why that case doesn't works, first date is before previous record end date so it should be checked as overlap as nay other record with different dates.&lt;/P&gt;&lt;P&gt;Maybe you need to add "product" and "product desc"&amp;nbsp; in order by clause, to ensure it has been readed as it expected (first one from older to newer, second pass from newer to older.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 16:26:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695823#M725589</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-04-22T16:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Overlap dates</title>
      <link>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695839#M725590</link>
      <description>&lt;P&gt;I think issue was with same dates, thus have added &lt;STRONG&gt;RowNo()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Like,&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;StartDate&amp;amp;RowNo() as %Key&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;now working fine all the cases!&lt;/P&gt;&lt;P&gt;Thanks Ruben &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 16:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Overlap-dates/m-p/1695839#M725590</guid>
      <dc:creator>paulwalker</dc:creator>
      <dc:date>2020-04-22T16:43:07Z</dc:date>
    </item>
  </channel>
</rss>

