<?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: Select date range from 2 separate date columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573082#M682892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I've read the article, but I don't see how that explains how to capture both the records that have Open Dates and/or Close Date within the date range. Whether I use an island or not, I still get only the records that have both Open Dates and Close Dates within the range - (not records where the Open Date is prior to the date range selected). In other words, if the date range is 1/1/2014 to 1/31/2014 and the Close Date is 1/1/2014, I'm not getting any records where the Open Date might be 12/15/2013.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking something like this, but this doesn't work either:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;count&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[OPEN DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;gt;=$(=Date(vStartDate))&amp;lt;=$(=Date(vEndDate))'} &amp;gt; + {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[CLOSE DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;gt;=$(=Date(vStartDate))&amp;lt;=$(=Date(vEndDate))'} &amp;gt; }&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LOAN NUMBER]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Feb 2014 15:23:43 GMT</pubDate>
    <dc:creator>lbunnell</dc:creator>
    <dc:date>2014-02-27T15:23:43Z</dc:date>
    <item>
      <title>Select date range from 2 separate date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573078#M682888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have 2 columns with dates representing the opening and closing of an item.&amp;nbsp; I have created 4 variables for 2 date ranges 1) OpenDate(vOpenStart, vOpenEnd) and 2) CloseDate (vCloseStart, vCloseEnd) to search with 2 sets of 2 calendar objects for selecting beginning and end dates along with a search button with the following expressions in each set of objects:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Open Date search button: &lt;BR /&gt;= '&amp;gt;=' &amp;amp; &lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vStartDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vEndDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Close Date search button:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;= '&amp;gt;=' &amp;amp; &lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vCloseStart&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;vCloseEnd&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'MM/DD/YYYY') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;&lt;IMG alt="calSearch.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/53888_calSearch.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;The way it is set up now, I only get one or the other when selecting each one individually, or if I select both, it eliminates the records that don't have both a start and close within the date range. &lt;STRONG&gt;What I need to do is create a single search button to be able to select all of the records where the OpenStart date OR the CloseStart date fall within the date range selected. &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Lawrence&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 13:59:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573078#M682888</guid>
      <dc:creator>lbunnell</dc:creator>
      <dc:date>2014-02-26T13:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Select date range from 2 separate date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573079#M682889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I &lt;EM&gt;suspect&lt;/EM&gt; that you need to look at creating your 2 calendars as data islands and then incorporate the selected values into set analysis functions to control your result set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a good thread to read &lt;A href="https://community.qlik.com/thread/71560"&gt;Conditional Queries with Data Islands&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 14:05:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573079#M682889</guid>
      <dc:creator>DavidFoster1</dc:creator>
      <dc:date>2014-02-26T14:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select date range from 2 separate date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573080#M682890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you explain further? The date fields are part of a larger dataset that contains a key field. If I create an islands of the calendar date, I don't understand how I would be able to use a set analysis that would show all the records that have key fields with open and close dates within the range if the island table doesn't know which records have associated key fields. Maybe, and quite possibly, I'm missing something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 15:25:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573080#M682890</guid>
      <dc:creator>lbunnell</dc:creator>
      <dc:date>2014-02-26T15:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select date range from 2 separate date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573081#M682891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you had a read of the thread I pointed to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data islands is an approach for complex (and potentially multi-fact) filters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The basic approach is to create separate data island tables with your 2 lists of dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your set analysis you then reference the data island values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;Year="_YEAR"&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where Year is the year in the normal model and _YEAR is the data island.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 15:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573081#M682891</guid>
      <dc:creator>DavidFoster1</dc:creator>
      <dc:date>2014-02-26T15:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Select date range from 2 separate date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573082#M682892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I've read the article, but I don't see how that explains how to capture both the records that have Open Dates and/or Close Date within the date range. Whether I use an island or not, I still get only the records that have both Open Dates and Close Dates within the range - (not records where the Open Date is prior to the date range selected). In other words, if the date range is 1/1/2014 to 1/31/2014 and the Close Date is 1/1/2014, I'm not getting any records where the Open Date might be 12/15/2013.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking something like this, but this doesn't work either:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;count&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[OPEN DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;gt;=$(=Date(vStartDate))&amp;lt;=$(=Date(vEndDate))'} &amp;gt; + {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[CLOSE DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'&amp;gt;=$(=Date(vStartDate))&amp;lt;=$(=Date(vEndDate))'} &amp;gt; }&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LOAN NUMBER]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 15:23:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573082#M682892</guid>
      <dc:creator>lbunnell</dc:creator>
      <dc:date>2014-02-27T15:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Select date range from 2 separate date columns</title>
      <link>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573083#M682893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I created the Date Island and this now works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[CLOSE DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(vStartDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[CLOSE DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(vEndDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; ) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[OPEN DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(vEndDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[OPEN DATE]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(vStartDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[LOAN NUMBER]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I get Open and Close dates within the selected date range of the island. H&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;owever, I'd like to do this in a Set Analysis which I haven't figured out yet.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 19:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-date-range-from-2-separate-date-columns/m-p/573083#M682893</guid>
      <dc:creator>lbunnell</dc:creator>
      <dc:date>2014-02-27T19:43:46Z</dc:date>
    </item>
  </channel>
</rss>

