<?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 Filter two unrelated date fields with one list Box in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Filter-two-unrelated-date-fields-with-one-list-Box/m-p/1057763#M354424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlickers, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to Qlikview and this is my first attempt to get involved with the community. I would like to find out about a rather general issue. &lt;/P&gt;&lt;P&gt;What I'm looking for is a way to select two unrelated columns (Date1 &amp;amp;Date210) with one and the same list box (year and month), as shown in the extract below.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Date Problem.JPG" class="jive-image image-1" src="/legacyfs/online/120566_Date Problem.JPG" style="height: 293px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;So if I choose March 2016 in the upper listbox, everything else should be cut to not only to Date1 OR Date210, but both at the same time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have been screening other community threads that seemed to discuss similar issues but none of them really got me further. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thank you already in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2016 15:18:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-04-05T15:18:49Z</dc:date>
    <item>
      <title>Filter two unrelated date fields with one list Box</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-two-unrelated-date-fields-with-one-list-Box/m-p/1057763#M354424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlickers, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to Qlikview and this is my first attempt to get involved with the community. I would like to find out about a rather general issue. &lt;/P&gt;&lt;P&gt;What I'm looking for is a way to select two unrelated columns (Date1 &amp;amp;Date210) with one and the same list box (year and month), as shown in the extract below.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Date Problem.JPG" class="jive-image image-1" src="/legacyfs/online/120566_Date Problem.JPG" style="height: 293px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;So if I choose March 2016 in the upper listbox, everything else should be cut to not only to Date1 OR Date210, but both at the same time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have been screening other community threads that seemed to discuss similar issues but none of them really got me further. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thank you already in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 15:18:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-two-unrelated-date-fields-with-one-list-Box/m-p/1057763#M354424</guid>
      <dc:creator />
      <dc:date>2016-04-05T15:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Filter two unrelated date fields with one list Box</title>
      <link>https://community.qlik.com/t5/QlikView/Filter-two-unrelated-date-fields-with-one-list-Box/m-p/1057764#M354425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yomula,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally the best way to deal with anything like this is in the load script and the data model.&amp;nbsp; So, a way you can approach this, if you have a unique ID on each row, is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MainData:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date210&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM SourceFile.qvd (qvd);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CombinedDates:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '1' as [Date Type],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date1 as [Generic Date],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(Date1) as Month,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Date1) as Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MonthStart(Date1), 'MMM-YY') as [Month Year]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RESIDENT MainData;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;CombinedDates:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp; ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp; '210' as [Date Type],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp; Date210 as [Generic Date],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp; Month(&lt;SPAN style="font-size: 13.3333px;"&gt;Date210&lt;/SPAN&gt;) as Month,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp; Year(&lt;SPAN style="font-size: 13.3333px;"&gt;Date210&lt;/SPAN&gt;) as Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp; Date(MonthStart(&lt;SPAN style="font-size: 13.3333px;"&gt;Date210&lt;/SPAN&gt;), 'MMM-YY') as [Month Year]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;RESIDENT MainData;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Now, when you build list boxes on the fields in the CombinedDates table and select a date it will pick any row from main data where one or the other date is in the selected range.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;BR /&gt;The creation of CombinedDates can include as many dates as you like.&amp;nbsp; It is &lt;STRONG&gt;crucial&lt;/STRONG&gt; that you have exactly the same fields in each instance of the CombinedDates table (in fact, creating it in a loop would be better - but that is a different thread).&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;If you had a lot of dates to combine you may chose to create a simpler CombinedDates table with just the Date field in and then have a separate calendar table (you will find lots of posts on creating these).&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Another approach altogether would be to have a data island with your date table in and control everything else in Set Analysis.&amp;nbsp; This is very flexible, but the code can get quite tricky quite quickly and the selections can end up counter intuitive.&amp;nbsp; I would aim to do things in the load script and data model every time...&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Hope that makes sense and is of help.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 17:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Filter-two-unrelated-date-fields-with-one-list-Box/m-p/1057764#M354425</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2016-04-05T17:06:28Z</dc:date>
    </item>
  </channel>
</rss>

