<?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: Logic Help - Join two tables based on date interval in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1656642#M593835</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had some issues with null value rows in my script reading from excel so to eliminate these I just made sure that I fetched valid rows of data.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2019 16:01:06 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2019-12-11T16:01:06Z</dc:date>
    <item>
      <title>Logic Help - Join two tables based on date interval</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1655884#M593832</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I am looking for some logic help. I have two QVDs.&lt;/P&gt;&lt;P&gt;1. Email: EmailSentDate is available for each customer (customerID is getting repeated)&lt;/P&gt;&lt;P&gt;2. Orders: Date1, Date2 fields are there, Flag should populate YES/NO if EmailSentDate falls between these two dates for the same customer.&lt;/P&gt;&lt;P&gt;I want to create a new flag in Orders QVD based on data available in Email QVD. Could you please have a look at the attachment and suggest me how can we achieve this output?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:44:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1655884#M593832</guid>
      <dc:creator>raju_salmon</dc:creator>
      <dc:date>2024-11-16T01:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Help - Join two tables based on date interval</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1655976#M593833</link>
      <description>&lt;P&gt;You can try something like this.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Email:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;BR /&gt;&amp;nbsp; CustomerID, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; EmailSentDate &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; [..\Downloads\Data.xlsx]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; (ooxml, embedded labels, table is Email)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Where&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; EmailSentDate &amp;gt; 0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;TmpOrders:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;BR /&gt;&amp;nbsp; CustomerID, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; Date1, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; Date2, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; Amount, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; Flag&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; [..\Downloads\Data.xlsx]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; (ooxml, embedded labels, table is Orders)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;WHERE&lt;BR /&gt;&amp;nbsp; CustomerID &amp;gt; 0&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LEFT JOIN (TmpOrders)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;IntervalMatch (EmailSentDate, CustomerID)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD Date1, Date2, CustomerID&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Resident TmpOrders&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;;&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;drop table Email;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Orders:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; CustomerID, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; Date1, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; Date2, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; Amount, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; Flag as ExpectedFlag,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; IF(EmailSentDate, 'YES', 'NO') as CalculatedFlag&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Resident TmpOrders&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Drop table TmpOrders;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 12:39:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1655976#M593833</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-12-10T12:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Help - Join two tables based on date interval</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1656041#M593834</link>
      <description>&lt;P&gt;Thanks you, can you explain the reason for below filters?&lt;/P&gt;&lt;P&gt;Where&lt;BR /&gt;EmailSentDate &amp;gt; 0;&lt;/P&gt;&lt;P&gt;WHERE&lt;BR /&gt;CustomerID &amp;gt; 0&lt;/P&gt;&lt;P&gt;Note: I have implemented another way but it makes cross join first then filter the data based on flag. Not efficient way, so will try your solution.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 14:12:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1656041#M593834</guid>
      <dc:creator>raju_salmon</dc:creator>
      <dc:date>2019-12-10T14:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Help - Join two tables based on date interval</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1656642#M593835</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had some issues with null value rows in my script reading from excel so to eliminate these I just made sure that I fetched valid rows of data.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 16:01:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1656642#M593835</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-12-11T16:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Help - Join two tables based on date interval</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1658726#M593836</link>
      <description>&lt;P&gt;Raju, if Vegar's solution did work for you, please be sure to return to your post and use the Accept as Solution button on his post to give him credit for the help and to let other Community Members know it did work for you.&amp;nbsp; If you are still trying to figure something out, leave an update on things.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only other thing I have that may be helpful would be the Design Blog area of Community, this is a repository of hundreds of how-to posts on all sorts of topics.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 21:08:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1658726#M593836</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-12-17T21:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Help - Join two tables based on date interval</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1662344#M593837</link>
      <description>&lt;P&gt;Thanks for the heads-up. Solution got worked very well. Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2020 09:50:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Help-Join-two-tables-based-on-date-interval/m-p/1662344#M593837</guid>
      <dc:creator>raju_salmon</dc:creator>
      <dc:date>2020-01-03T09:50:23Z</dc:date>
    </item>
  </channel>
</rss>

