<?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: Count overlapping days between two date ranges (Intersections) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796592#M281381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RangeMax(0, RangeMin(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vEnd_Date&lt;/SPAN&gt;,[&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Actual Check Out Date]&lt;/SPAN&gt;) - RangeMax(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vStart_Date&lt;/SPAN&gt;,[&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Actual Check In Date]&lt;/SPAN&gt;))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Dec 2014 00:44:41 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2014-12-09T00:44:41Z</dc:date>
    <item>
      <title>Count overlapping days between two date ranges (Intersections)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796590#M281379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is with further reference to below thread;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/130082"&gt;Insert rows between two date ranges&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get the count of days which overlap between below two date ranges. (Inclusive of first and last dates)&lt;/P&gt;&lt;P&gt;Eg. Select vStart_Date&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&amp;nbsp; Select vEnd_Date&amp;nbsp; (01-Jan-14 to 04-Jan-14)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Actual Check In Date&amp;nbsp; - Actual Check Out Date (02-Jan-14 to 06-Jan-14)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to get the overlapping count as 03 days ( 02-Jan-14 to 04-Jan-14 inclusive of both days) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;Senarath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 17:50:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796590#M281379</guid>
      <dc:creator>senarath</dc:creator>
      <dc:date>2014-12-08T17:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Count overlapping days between two date ranges (Intersections)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796591#M281380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14180841554277075" jivemacro_uid="_14180841554277075"&gt;
&lt;P&gt;if(e1&amp;gt;e2,e2,e1)-if(s1&amp;gt;s2,s1,s2)+1&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;is that OK? Assuming s1 = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Select vStart_Date, e1 = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Select vEnd_Date, s2 = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Actual Check In Date, e2 = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Actual Check Out Date...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;And you should check it for positive results, of course (negative will mean lack of intersection).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 00:13:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796591#M281380</guid>
      <dc:creator />
      <dc:date>2014-12-09T00:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Count overlapping days between two date ranges (Intersections)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796592#M281381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RangeMax(0, RangeMin(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vEnd_Date&lt;/SPAN&gt;,[&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Actual Check Out Date]&lt;/SPAN&gt;) - RangeMax(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vStart_Date&lt;/SPAN&gt;,[&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Actual Check In Date]&lt;/SPAN&gt;))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 00:44:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796592#M281381</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-12-09T00:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count overlapping days between two date ranges (Intersections)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796593#M281382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this and did not work because the date selection can be varied according to user. We cannot predefined which date going to be less than what.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me try out other answers and give a feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 08:00:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796593#M281382</guid>
      <dc:creator>senarath</dc:creator>
      <dc:date>2014-12-09T08:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Count overlapping days between two date ranges (Intersections)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796594#M281383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you going to acquire the dates from user? Control elements that change some variables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 08:10:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796594#M281383</guid>
      <dc:creator />
      <dc:date>2014-12-09T08:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count overlapping days between two date ranges (Intersections)</title>
      <link>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796595#M281384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I applied your answer and it works. However, as I wanted both days inclusive, I modified it as below by adding 1&lt;/P&gt;&lt;P&gt;and figures seem ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;RangeMax(0, RangeMin(&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vEnd_Date&lt;STRONG&gt;+1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;,[&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Actual Check Out Date]&lt;STRONG&gt;+1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; - RangeMax(&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vStart_Date&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;,[&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Actual Check In Date]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;Hope, technically this is ok.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;Many thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 08:26:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-overlapping-days-between-two-date-ranges-Intersections/m-p/796595#M281384</guid>
      <dc:creator>senarath</dc:creator>
      <dc:date>2014-12-09T08:26:40Z</dc:date>
    </item>
  </channel>
</rss>

