<?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: Join table with duplicate entries conditioned on first table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250055#M871542</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;See the attached example. In the script when you analyze the dates you can analyze the other.&lt;/P&gt;&lt;P&gt;Hope this help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Nov 2016 20:48:36 GMT</pubDate>
    <dc:creator>spividori</dc:creator>
    <dc:date>2016-11-14T20:48:36Z</dc:date>
    <item>
      <title>Join table with duplicate entries conditioned on first table</title>
      <link>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250051#M871538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to join two tables where the 2nd has multiple entries.&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143879_pastedImage_4.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Logic:&lt;/P&gt;&lt;P&gt;Match column A&lt;/P&gt;&lt;P&gt;if B within D,E display result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help would be great, thank you!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250051#M871538</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Join table with duplicate entries conditioned on first table</title>
      <link>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250052#M871539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the IntervalMatch function for that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14791551368475304" jivemacro_uid="_14791551368475304"&gt;
&lt;P&gt;Table1:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, B, C&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 01/03/2016, 1.99&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 01/27/2016, 2.99&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, 02/01/2016, 3.99&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Table2_Temp:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A, result, D, E&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, F, 01/01/2016, 01/04/2016&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, G, 01/06/2016, 01/09/2016&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, H, 01/11/2016, 01/14/2016&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, F, 01/16/2016, 01/19/2016&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, G, 01/21/2016, 01/24/2016&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, H, 01/26/2016, 01/29/2016&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, F, 01/31/2016, 02/03/2016&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Table2:&lt;/P&gt;
&lt;P&gt;IntervalMatch(B, A)&lt;/P&gt;
&lt;P&gt;LOAD D, E, A&lt;/P&gt;
&lt;P&gt;RESIDENT Table2_Temp;&lt;/P&gt;
&lt;P&gt;LEFT JOIN (Table2)&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;RESIDENT Table2_Temp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE Table2_Temp;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: The IntervalMatch function does create a synthetic key in order to link the one date between the other two.&amp;nbsp; This synthetic key is fine and can be kept in your data model.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 20:26:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250052#M871539</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2016-11-14T20:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Join table with duplicate entries conditioned on first table</title>
      <link>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250053#M871540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the quick reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if I have another field I need to check on Table 2?&amp;nbsp; how&amp;nbsp; can I incorporate this? would it change everything?&lt;/P&gt;&lt;P&gt;Suppose there's a column G on table2, where it has either "Result" or blank.&lt;/P&gt;&lt;P&gt;so for the column Result, I only want to return a value if column G isn't blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logic:&lt;/P&gt;&lt;P&gt;1. match column A&lt;/P&gt;&lt;P&gt;2. column G = "Result"&lt;/P&gt;&lt;P&gt;3. column B falls in date range (D,E)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 20:39:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250053#M871540</guid>
      <dc:creator />
      <dc:date>2016-11-14T20:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Join table with duplicate entries conditioned on first table</title>
      <link>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250054#M871541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to add a where clause at this part:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;IntervalMatch(B, A)&lt;/P&gt;&lt;P&gt;LOAD D, E, A&lt;/P&gt;&lt;P&gt;RESIDENT Table2_Temp&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #008000;"&gt;WHERE G = 'Result';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Table2)&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT Table2_Temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 20:44:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250054#M871541</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2016-11-14T20:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Join table with duplicate entries conditioned on first table</title>
      <link>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250055#M871542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;See the attached example. In the script when you analyze the dates you can analyze the other.&lt;/P&gt;&lt;P&gt;Hope this help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 20:48:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250055#M871542</guid>
      <dc:creator>spividori</dc:creator>
      <dc:date>2016-11-14T20:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Join table with duplicate entries conditioned on first table</title>
      <link>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250056#M871543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you both, it worked out!&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2016 22:09:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-table-with-duplicate-entries-conditioned-on-first-table/m-p/1250056#M871543</guid>
      <dc:creator />
      <dc:date>2016-11-14T22:09:10Z</dc:date>
    </item>
  </channel>
</rss>

