<?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: How to filter by several data ranges specified in a table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-filter-by-several-data-ranges-specified-in-a-table/m-p/113469#M7846</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the answer to my question came from these steps:&lt;/P&gt;&lt;P&gt;1. Open &lt;SPAN style="font-size: 13.3333px;"&gt;the first connection and l&lt;/SPAN&gt;oad date ranges (periods)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;2. Open the second connection and create a table with all the dates of each sale (sales).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. Create another table like this:&lt;/P&gt;&lt;P&gt;OUTER JOIN&lt;/P&gt;&lt;P&gt;INTERVALMATCH(sales_date)&lt;/P&gt;&lt;P&gt;LOAD start_date, end_date&lt;/P&gt;&lt;P&gt;RESIDENT periods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way YearID and MonthID are related to sales_date and I can use in a normal filter pane YearID and MonthID to filter by period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is important the order of the data load because the resident table is in memory and can be recalled even if its original connection source is closed. If we did the data load upside down there would be an error for Qlik not finding a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing my own answer to thank everybody who spends their time to help newbies like me for free and just in case somebody else ever has the same issue I faced.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2018 18:09:09 GMT</pubDate>
    <dc:creator>agustapia</dc:creator>
    <dc:date>2018-09-11T18:09:09Z</dc:date>
    <item>
      <title>How to filter by several data ranges specified in a table</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-filter-by-several-data-ranges-specified-in-a-table/m-p/113468#M7845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been thinking a lot and researching a lot and just can´t find an answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have a table with custom date ranges that are identified by the year and month that these ranges include most:&lt;/P&gt;&lt;P&gt;YearID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Date&lt;/P&gt;&lt;P&gt;2018&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01&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; 2018-01-01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-01-28&lt;/P&gt;&lt;P&gt;2018&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02&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; 2018-01-29&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-02-25&lt;/P&gt;&lt;P&gt;2018&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03&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; 2018-02-26&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2018-04-01&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I need to give my users a filter by YearID and MonthID that sums the sales within the specific date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the date table and the sales table are in different data bases, so I cannot try an SQL query that adds an additional column with an identifier like YearID*100+MonthID for each range, which was my first thought.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2018 17:59:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-filter-by-several-data-ranges-specified-in-a-table/m-p/113468#M7845</guid>
      <dc:creator>agustapia</dc:creator>
      <dc:date>2018-09-10T17:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by several data ranges specified in a table</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-filter-by-several-data-ranges-specified-in-a-table/m-p/113469#M7846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So the answer to my question came from these steps:&lt;/P&gt;&lt;P&gt;1. Open &lt;SPAN style="font-size: 13.3333px;"&gt;the first connection and l&lt;/SPAN&gt;oad date ranges (periods)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;2. Open the second connection and create a table with all the dates of each sale (sales).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. Create another table like this:&lt;/P&gt;&lt;P&gt;OUTER JOIN&lt;/P&gt;&lt;P&gt;INTERVALMATCH(sales_date)&lt;/P&gt;&lt;P&gt;LOAD start_date, end_date&lt;/P&gt;&lt;P&gt;RESIDENT periods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way YearID and MonthID are related to sales_date and I can use in a normal filter pane YearID and MonthID to filter by period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is important the order of the data load because the resident table is in memory and can be recalled even if its original connection source is closed. If we did the data load upside down there would be an error for Qlik not finding a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing my own answer to thank everybody who spends their time to help newbies like me for free and just in case somebody else ever has the same issue I faced.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2018 18:09:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-filter-by-several-data-ranges-specified-in-a-table/m-p/113469#M7846</guid>
      <dc:creator>agustapia</dc:creator>
      <dc:date>2018-09-11T18:09:09Z</dc:date>
    </item>
  </channel>
</rss>

