<?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 Dealing with two dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dealing-with-two-dates/m-p/675161#M1076936</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables and in those two tables i use two different dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i want to use common date in date filters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say my tow dates are &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mydate&amp;nbsp;&amp;nbsp; in mytable and machinedate in machine table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use common date in my calander&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jul 2014 09:28:44 GMT</pubDate>
    <dc:creator>anuradhaa</dc:creator>
    <dc:date>2014-07-15T09:28:44Z</dc:date>
    <item>
      <title>Dealing with two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-two-dates/m-p/675161#M1076936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables and in those two tables i use two different dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i want to use common date in date filters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say my tow dates are &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mydate&amp;nbsp;&amp;nbsp; in mytable and machinedate in machine table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use common date in my calander&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 09:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-two-dates/m-p/675161#M1076936</guid>
      <dc:creator>anuradhaa</dc:creator>
      <dc:date>2014-07-15T09:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-two-dates/m-p/675162#M1076937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anuradha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/02/17/canonical-date" title="http://community.qlik.com/blogs/qlikviewdesignblog/2014/02/17/canonical-date"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2014/02/17/canonical-date&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;AS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 09:32:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-two-dates/m-p/675162#M1076937</guid>
      <dc:creator>amit_saini</dc:creator>
      <dc:date>2014-07-15T09:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-two-dates/m-p/675163#M1076938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anuradha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use a MasterCalendar like this:&lt;/P&gt;&lt;P&gt;LET varMinDate = StartDate; eg:'6/15/2001'&lt;/P&gt;&lt;P&gt;LET varMaxDate = EndDate; eg: Today();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//************TempCalendar***********&lt;BR /&gt;TempCalendar: &lt;BR /&gt;LOAD&lt;BR /&gt; $(varMinDate) + rowno() - 1 AS DateNumber,&lt;BR /&gt; date ($(varMinDate) + rowno() - 1) AS TempDate&lt;BR /&gt;AUTOGENERATE&lt;BR /&gt; $(varMaxDate) - $(varMinDate) + 1;&lt;/P&gt;&lt;P&gt;//*************Master Calendar************&lt;BR /&gt;MasterCalendar: &lt;BR /&gt;LOAD&lt;BR /&gt; TempDate AS Date,&lt;BR /&gt; Week (TempDate) AS Week,&lt;BR /&gt; Year (TempDate) AS Year,&lt;BR /&gt; Month (TempDate) AS Month,&lt;BR /&gt; Day (TempDate) AS Day,&lt;BR /&gt; Weekday (TempDate) AS WeekDay,&lt;BR /&gt; 'Q' &amp;amp; Ceil(Month (TempDate)/3) AS Quarter,&lt;BR /&gt; Date( Monthstart (TempDate), 'MMM-YYYY') AS MonthYear,&lt;BR /&gt; Week (TempDate) &amp;amp; '-' &amp;amp; Year (TempDate) AS WeekYear&lt;BR /&gt; &lt;BR /&gt;Resident TempCalendar&lt;BR /&gt;Order by TempDate ASC;&lt;BR /&gt; &lt;BR /&gt;Drop Table TempCalendar; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if you want 2 different dates for analysis, you need 1 calendar per date...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful for you!&lt;/P&gt;&lt;P&gt;BRGDS,&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 09:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-two-dates/m-p/675163#M1076938</guid>
      <dc:creator />
      <dc:date>2014-07-15T09:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with two dates</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-two-dates/m-p/675164#M1076939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems you want to associate both the tables based on the date fields.&lt;/P&gt;&lt;P&gt;May be you can try the code below.&lt;/P&gt;&lt;P&gt;// create a table by loading distinct dates from both the tables and join&lt;/P&gt;&lt;P&gt;Tab1:&lt;/P&gt;&lt;P&gt;load OtherFields1,[Date Field1] as [Date Field] from tab1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tab2:&lt;/P&gt;&lt;P&gt;load OtherFields2,[Date Field2] as [Date Field] from tab2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCalendar:&lt;/P&gt;&lt;P&gt;load Distinct [Date Field] Resident Tab1;&lt;/P&gt;&lt;P&gt;Join LOAD Distinct [Date Field] Resident Tab2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MainCalendar:&lt;/P&gt;&lt;P&gt;load [Date Field] Resident TempCalendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table TempCalendar;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 09:52:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-two-dates/m-p/675164#M1076939</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2014-07-15T09:52:10Z</dc:date>
    </item>
  </channel>
</rss>

