<?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 Date Comparisons between tables using a dynamic variable for the &amp;quot;no of days between&amp;quot; in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-Comparisons-between-tables-using-a-dynamic-variable-for-the/m-p/1879679#M72504</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Wonder if you can help me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 tables which both have an eventID and dates and i need to identify which dates in one table happen BEFORE the date in the other table.&amp;nbsp; As an example:&lt;/P&gt;
&lt;P&gt;in table 1,&amp;nbsp; I have eventID and a date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;eg. Table 1&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Event ID&lt;/TD&gt;
&lt;TD width="50%"&gt;Date&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Event 1&lt;/TD&gt;
&lt;TD width="50%"&gt;4th Feb 2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Event 2&lt;/TD&gt;
&lt;TD&gt;20 Dec 2020&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in table 2, i have a number of different rows involving event IDs and different dates,&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;Row ID&lt;/TD&gt;
&lt;TD width="25%"&gt;Event ID&lt;/TD&gt;
&lt;TD width="50%"&gt;Date&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;1&lt;/TD&gt;
&lt;TD width="25%"&gt;Event 1&lt;/TD&gt;
&lt;TD width="50%"&gt;1st Dec 2020&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;2&lt;/TD&gt;
&lt;TD width="25%"&gt;Event 2&lt;/TD&gt;
&lt;TD width="50%"&gt;12th Dec 2020&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;3&lt;/TD&gt;
&lt;TD width="25%"&gt;Event 1&lt;/TD&gt;
&lt;TD width="50%"&gt;27th Jan 2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;4&lt;/TD&gt;
&lt;TD width="25%"&gt;Event 1&lt;/TD&gt;
&lt;TD width="50%"&gt;1st Feb 2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;Event 1&lt;/TD&gt;
&lt;TD&gt;1st Mar 2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My requirement on my app is to find all the dates in table 2 which occur BEFORE the date with the same event ID in table 1.&lt;/P&gt;
&lt;P&gt;On my app, i am going to add a slider attached to a variable (vNoOfDays) which will act as a filter which allows me to set an integer to dynamically define "how many days before".&lt;/P&gt;
&lt;P&gt;so if my slider is set to 5, i want to include row 4 from table 2 as 1st Feb is &amp;lt; 5 days from my event date in table 1 (4th Feb) for event 1.&lt;/P&gt;
&lt;P&gt;If the slider is set to 15, i want to include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;row 4 and row 3 as both 27th Jan 2021 and 1st feb 2021 are &amp;lt; 15 days from 4th Feb for Event 1&lt;/LI&gt;
&lt;LI&gt;row 2 as 12th Dec is &amp;lt; 15 days from 20th Dec for Event 2&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hoping that makes sense!&lt;/P&gt;
&lt;P&gt;Basically my date in table 1 is a hard date and i need to find all the rows in table 2 which fall before the hard date, but the number of days before is determined by my dynamic slider.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for any help!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jan 2022 16:35:30 GMT</pubDate>
    <dc:creator>KarenBC</dc:creator>
    <dc:date>2022-01-11T16:35:30Z</dc:date>
    <item>
      <title>Date Comparisons between tables using a dynamic variable for the "no of days between"</title>
      <link>https://community.qlik.com/t5/App-Development/Date-Comparisons-between-tables-using-a-dynamic-variable-for-the/m-p/1879679#M72504</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Wonder if you can help me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 tables which both have an eventID and dates and i need to identify which dates in one table happen BEFORE the date in the other table.&amp;nbsp; As an example:&lt;/P&gt;
&lt;P&gt;in table 1,&amp;nbsp; I have eventID and a date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;eg. Table 1&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Event ID&lt;/TD&gt;
&lt;TD width="50%"&gt;Date&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Event 1&lt;/TD&gt;
&lt;TD width="50%"&gt;4th Feb 2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Event 2&lt;/TD&gt;
&lt;TD&gt;20 Dec 2020&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in table 2, i have a number of different rows involving event IDs and different dates,&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;Row ID&lt;/TD&gt;
&lt;TD width="25%"&gt;Event ID&lt;/TD&gt;
&lt;TD width="50%"&gt;Date&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;1&lt;/TD&gt;
&lt;TD width="25%"&gt;Event 1&lt;/TD&gt;
&lt;TD width="50%"&gt;1st Dec 2020&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;2&lt;/TD&gt;
&lt;TD width="25%"&gt;Event 2&lt;/TD&gt;
&lt;TD width="50%"&gt;12th Dec 2020&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;3&lt;/TD&gt;
&lt;TD width="25%"&gt;Event 1&lt;/TD&gt;
&lt;TD width="50%"&gt;27th Jan 2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="25%"&gt;4&lt;/TD&gt;
&lt;TD width="25%"&gt;Event 1&lt;/TD&gt;
&lt;TD width="50%"&gt;1st Feb 2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;Event 1&lt;/TD&gt;
&lt;TD&gt;1st Mar 2021&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My requirement on my app is to find all the dates in table 2 which occur BEFORE the date with the same event ID in table 1.&lt;/P&gt;
&lt;P&gt;On my app, i am going to add a slider attached to a variable (vNoOfDays) which will act as a filter which allows me to set an integer to dynamically define "how many days before".&lt;/P&gt;
&lt;P&gt;so if my slider is set to 5, i want to include row 4 from table 2 as 1st Feb is &amp;lt; 5 days from my event date in table 1 (4th Feb) for event 1.&lt;/P&gt;
&lt;P&gt;If the slider is set to 15, i want to include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;row 4 and row 3 as both 27th Jan 2021 and 1st feb 2021 are &amp;lt; 15 days from 4th Feb for Event 1&lt;/LI&gt;
&lt;LI&gt;row 2 as 12th Dec is &amp;lt; 15 days from 20th Dec for Event 2&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Hoping that makes sense!&lt;/P&gt;
&lt;P&gt;Basically my date in table 1 is a hard date and i need to find all the rows in table 2 which fall before the hard date, but the number of days before is determined by my dynamic slider.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for any help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 16:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-Comparisons-between-tables-using-a-dynamic-variable-for-the/m-p/1879679#M72504</guid>
      <dc:creator>KarenBC</dc:creator>
      <dc:date>2022-01-11T16:35:30Z</dc:date>
    </item>
  </channel>
</rss>

