<?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 How to get date interval overlapping in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310257#M1198488</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, I haven't found anything useful in date and time functions. The intervalmatch lets me link a single date with an interval while i need to find the intersection of two intervals&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Mar 2011 18:43:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-02T18:43:55Z</dc:date>
    <item>
      <title>How to get date interval overlapping</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310255#M1198486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;&lt;BR /&gt;prova:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; mac_, from_, to_, value_&lt;BR /&gt; m1, 1/12/2005, 31/1/2006, 1000&lt;BR /&gt; m1, 1/12/2006, 31/1/2007, 2000&lt;BR /&gt; m2, 1/12/2005, 31/1/2006, 1500&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to know the fraction of each interval (from_-&amp;gt;to_) in each year in order to calculate the total value_ amount for each year. In the example for mac_ = m1 and year = 2006: 1000*1/12 + 2000 * 1/12.&lt;/P&gt;&lt;P&gt;I think I can find the solution by using several nested if, but is there any ready-made function in qv which returns the overlapping of two time intervals? (i.e.: 1/1/2006-31/12/2006 vs 1/12/2005-31/1/2006)&lt;/P&gt;&lt;P&gt;Thanks in advance for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 17:30:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310255#M1198486</guid>
      <dc:creator />
      <dc:date>2011-03-02T17:30:31Z</dc:date>
    </item>
    <item>
      <title>How to get date interval overlapping</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310256#M1198487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn´t get what you are trying to do exactly, but search QVs help for "Date and Time Function".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may find a way to solve it in the script using INTERVALMATCH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 18:22:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310256#M1198487</guid>
      <dc:creator>fernandotoledo</dc:creator>
      <dc:date>2011-03-02T18:22:31Z</dc:date>
    </item>
    <item>
      <title>How to get date interval overlapping</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310257#M1198488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, I haven't found anything useful in date and time functions. The intervalmatch lets me link a single date with an interval while i need to find the intersection of two intervals&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 18:43:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310257#M1198488</guid>
      <dc:creator />
      <dc:date>2011-03-02T18:43:55Z</dc:date>
    </item>
    <item>
      <title>How to get date interval overlapping</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310258#M1198489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a feeling I'm misunderstanding the question, but how about:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prova:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;Delta2006 / 365 as Pct2006&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;RangeMax(RangeMin(to_, MakeDate(2006,12,31)) - RangeMax(from_, MakeDate(2006)) , 0) As Delta2006&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;mac_, from_, to_, value_&lt;/P&gt;&lt;P&gt;m1, 1/12/2005, 31/1/2006, 1000&lt;/P&gt;&lt;P&gt;m1, 1/12/2006, 31/1/2007, 2000&lt;/P&gt;&lt;P&gt;m2, 1/12/2005, 31/1/2006, 1500&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 20:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310258#M1198489</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-03-02T20:12:06Z</dc:date>
    </item>
    <item>
      <title>How to get date interval overlapping</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310259#M1198490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a feeling I'm misunderstanding the question, but how about:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prova:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;Delta2006 / 365 as Pct2006&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;RangeMax(RangeMin(to_, MakeDate(2006,12,31)) - RangeMax(from_, MakeDate(2006)) , 0) As Delta2006&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;mac_, from_, to_, value_&lt;/P&gt;&lt;P&gt;m1, 1/12/2005, 31/1/2006, 1000&lt;/P&gt;&lt;P&gt;m1, 1/12/2006, 31/1/2007, 2000&lt;/P&gt;&lt;P&gt;m2, 1/12/2005, 31/1/2006, 1500&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 20:15:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310259#M1198490</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-03-02T20:15:10Z</dc:date>
    </item>
    <item>
      <title>How to get date interval overlapping</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310260#M1198491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date(max(total &amp;lt;mac_&amp;gt; from_))-date(min(total &amp;lt;mac_&amp;gt; to_))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what you're looking for?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 20:17:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-date-interval-overlapping/m-p/310260#M1198491</guid>
      <dc:creator />
      <dc:date>2011-03-02T20:17:24Z</dc:date>
    </item>
  </channel>
</rss>

