<?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: 1 fact table, 2 date dimensions, 1 master calendar in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286728#M106698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;tmendesf wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...I have some tables (in each table I have 2 or more date fields) and I want to have a single master calendar for every date field in order to be able to have, for example, a chart and can filter by year. How can I do that?...&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll post my most recent example of this sort of thing, which handles multiple dates from multiple tables as requested, so it may be what you need.&amp;nbsp; I say "may" because this approach applied to multiple tables CAN cause loops in the data structure, in which case you'll need either underlying data model changes or just a completely different solution (such as the island calendar, also discussed below).&amp;nbsp; Since you can't bring up the example, I'll also give you the script and the chart definitions below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SET DateFormat='YYYY-M-D';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Table1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ID, Seq, ActivityDate, Value1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;1, 1, 2011-5-10,10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;1, 2, 2011-5-12,2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2, 1, 2011-5-12,20&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;3, 1, 2011-6-15,40&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Table2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD recno() as ID, * INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DepartureDate, ArrivalDate, Value2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-15,2011-6-16,5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-15,2011-6-17,10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-16,2011-6-16,20&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OtherTable:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD recno() as OtherID, * INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OtherDate, OtherValue&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-5-12,2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-15,3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-17,5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Link:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Seq&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,ActivityDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Activity' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Table1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE (Link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,DepartureDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Departure' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Table2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE (Link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,ArrivalDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Arrival' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Table2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE (Link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; OtherID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,OtherDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Other' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT OtherTable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Calendar:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(monthstart(Date),'MMM YYYY') as Month&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(makedate(2011,5,1)+recno()-1) as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE 61&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;IslandCalendar:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(monthstart(IslandDate),'MMM YYYY') as IslandMonth&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(makedate(2011,5,1)+recno()-1) as IslandDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE 61&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in the script above, Table1, Table2 and OtherTable are my actual data tables.&amp;nbsp; The intent of the rest of the script is to add to this model without changing it, and for the additions to handle the linkage to a single generic calendar.&amp;nbsp; The Link table is where all this linkage happens, where all the magic happens, and then the Calendar table is the generic calendar.&amp;nbsp; The IslandCalendar table is for the alternative I mentioned, which is probably a much more common solution to this kind of problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My example has three example charts in it.&amp;nbsp; The first is a straight table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 1: sum({&amp;lt;DateType={'Activity'}&amp;gt;} Value1) // set analysis needed because ID is shared&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 2: sum({&amp;lt;DateType={'Departure'}&amp;gt;} Value2) // set analysis needed because ID is shared&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 3: sum(OtherValue) // set analysis not needed because OtherID not shared&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second chart is exactly the same except for using Month as a dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The third chart is a pivot table defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 1:&amp;nbsp; &lt;/SPAN&gt;ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 2:&amp;nbsp; &lt;/SPAN&gt;DepartureDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 3:&amp;nbsp; &lt;/SPAN&gt;ArrivalDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 4:&amp;nbsp; &lt;/SPAN&gt;ActivityDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 1: sum(Value1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 2: if(dimensionality()=1,sum(Value2))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then we have the island calendar alternative.&amp;nbsp; As stated in a text box on the sheet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;"An island calendar is disconnected from the rest of your data.&amp;nbsp; It's a possible alternative if using the data model solution above causes loops in your data structure.&amp;nbsp; The disadvantage is largely performance, as every expression must use an if() to link the island date back to whatever date you actually care about, which can be a very slow process compared to direct links in the data model.&amp;nbsp; The expressions would typically be more complex with an island calendar as well.&amp;nbsp; In the example, the expressions are of similar complexity, but that's because our example is particularly complex, sharing an ID across multiple tables that each have dates.&amp;nbsp; This is probably atypical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;The bottom example chart is the same either way, as it is referring directly to the underlying dates rather than either of our master calendars."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first chart with the island calendar is defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension:&amp;nbsp;&amp;nbsp;&amp;nbsp; IslandDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 1: sum(if(ActivityDate=IslandDate,Value1))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 2: sum(if(DepartureDate=IslandDate,Value2))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 3: sum(if(OtherDate=IslandDate,OtherValue))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second chart is just like the first but with IslandMonth as the dimension.&amp;nbsp; And the third chart is exactly the same as the third chart with the previous solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Oct 2012 19:14:33 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2012-10-12T19:14:33Z</dc:date>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286714#M106684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. a fact table that contains two date dimensions (first created date and departure date)&lt;/P&gt;&lt;P&gt;2. 1 master calendar&lt;/P&gt;&lt;P&gt;3. a linked table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the master calendar can only link to 1 date dimension in the fact table. how can i link the master calender to both date dimensions? the only solution that i see is to read the fact tables twice and create two fact tables. is that the best solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 07:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286714#M106684</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2011-05-10T07:40:27Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286715#M106685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whats the purpose of the master calendar? in other words, what should happen if i select may 10th 2011?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reyman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 11:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286715#M106685</guid>
      <dc:creator />
      <dc:date>2011-05-10T11:56:22Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286716#M106686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have several fact tables. All the other fact tables only contains 1 date dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;purpose of master calendar:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* when you select 10th may 2011 .. you well see all the data of that day of each fact table, makes it possible to compare&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* when i have a bar chart and a certain data doesnt contain any data, when my bar chart will miss days. i want to see the 0 values dates in my bar chart. I need a master calendar for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 12:26:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286716#M106686</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2011-05-10T12:26:32Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286717#M106687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what i meant was, in the one fact table containing the 2 date fields, must they both be May 10, or just one of them? what are those dates supposted to mean? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 12:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286717#M106687</guid>
      <dc:creator />
      <dc:date>2011-05-10T12:35:23Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286718#M106688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have now the fact table, which contains 2 fields with date (created and departure), linked to the master calender (via link table) on only 1 date (created). but i want in my pivot chart to both analyse the values on created date and departure date. including link to the master calender. in my opinion this can only be achieved to read the same fact table twice. one table will use the created date, the other table will use the departure date.&lt;/P&gt;&lt;P&gt;i was wondering if there is a different solution besides reading the fact table twice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 12:43:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286718#M106688</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2011-05-10T12:43:10Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286719#M106689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try by linking the one date to the master calendar and the other in an expression with set analysis code linking dynamic to the the selected date in the master calendar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 12:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286719#M106689</guid>
      <dc:creator />
      <dc:date>2011-05-10T12:48:29Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286720#M106690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sounds good .. do you have an example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 12:55:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286720#M106690</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2011-05-10T12:55:02Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286721#M106691</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 tried it with something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum (&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{1&amp;lt;&lt;/P&gt;&lt;P&gt;&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; &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;&amp;nbsp;FactTable.Date1={$(=Max(Calendar.CalDate))},&lt;/P&gt;&lt;P&gt;&amp;nbsp; FactTable.Date2={$(=Max(Calendar.CalDate))},&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;gt;}&lt;/P&gt;&lt;P&gt; Amount&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assumed that the dateformat is the same for all the different date fields, you can use this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case you get all the Amounts when Date1 and Date2 are equal to the maximum value of CalDate.&lt;/P&gt;&lt;P&gt;You can look into the helpfile for more examples of the Set Analysis code. The basics are explained there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is close to what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reyman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 13:05:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286721#M106691</guid>
      <dc:creator />
      <dc:date>2011-05-10T13:05:05Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286722#M106692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using a seperate table (not coupled to other tables) for one of the date selections and then using Set Analysis works good for most of these situations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using 2 date selections on one date (start and ending date), this will not work ... since one selection rules out the other one. In this case you should consider adding 2 seperate date tables and only use set analysis (with big data amounts this is not really good for the performance!!).&lt;/P&gt;&lt;P&gt;Another way is doing some pre-loading in the LOAD script to add some extra data (link table or whatever you want) which contains the date combinations possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 13:41:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286722#M106692</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-10T13:41:04Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286723#M106693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link active_link" href="https://community.qlik.com/people/reyman" id="jive-6414831305305347016"&gt;reyman&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({1&amp;lt;departuredate={"&amp;gt;=$(=MIN(DateYYYYMMDD))&amp;lt;=$(=MAX(DateYYYYMMDD))"}&amp;gt;} DISTINCT value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm using this one right now .. works great .. but only when the user selects 1 year and a few weeks/days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a problem when a user selects 2 years and 1 weeknumber. i want to see the results of only week 2010-16 and 2011-16. now i get the range between 2010-16 and 2011-16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your set analysis i can't get it working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 May 2011 21:33:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286723#M106693</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2011-05-15T21:33:29Z</dc:date>
    </item>
    <item>
      <title>1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286724#M106694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'v added week also to the set analysis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 May 2011 22:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286724#M106694</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2011-05-15T22:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286725#M106695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amien, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would the attached example work for you?&lt;/P&gt;&lt;P&gt;Now it uses the selected values based on both the fields (created &amp;amp; departuredate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Reyman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2011 15:22:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286725#M106695</guid>
      <dc:creator />
      <dc:date>2011-05-17T15:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286726#M106696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can link multiple dates to a generic calendar by using a linkage table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,CreatedDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Created' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE (Link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,DepartureDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Departure' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Data&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached example.&amp;nbsp; In the example, I leave the original date fields in place so that you can see the raw data.&amp;nbsp; However, you may want to remove them in the actual application, as having too many date fields can be confusing when it comes time for users to make selections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2011 20:16:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286726#M106696</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-05-17T20:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286727#M106697</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 think I would need your help. I'm very new on QV and I'm facing some problems that should be easy for you guys who work with QV for a long time...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, I cant understand the most of the examples that are in the community so I need some costum help for my problem... So, I have some tables (in each table I have 2 or more date fields) and I want to have a single master calendar for every date field in order to be able to have, for example, a chart and can filter by year. How can I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have another issue, I cant open your .qvw samples cause I'm running the Personal Edition and i no longer can open external files...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you can help me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;TMF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 14:11:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286727#M106697</guid>
      <dc:creator />
      <dc:date>2012-10-12T14:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286728#M106698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;tmendesf wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...I have some tables (in each table I have 2 or more date fields) and I want to have a single master calendar for every date field in order to be able to have, for example, a chart and can filter by year. How can I do that?...&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll post my most recent example of this sort of thing, which handles multiple dates from multiple tables as requested, so it may be what you need.&amp;nbsp; I say "may" because this approach applied to multiple tables CAN cause loops in the data structure, in which case you'll need either underlying data model changes or just a completely different solution (such as the island calendar, also discussed below).&amp;nbsp; Since you can't bring up the example, I'll also give you the script and the chart definitions below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SET DateFormat='YYYY-M-D';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Table1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ID, Seq, ActivityDate, Value1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;1, 1, 2011-5-10,10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;1, 2, 2011-5-12,2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2, 1, 2011-5-12,20&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;3, 1, 2011-6-15,40&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Table2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD recno() as ID, * INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DepartureDate, ArrivalDate, Value2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-15,2011-6-16,5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-15,2011-6-17,10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-16,2011-6-16,20&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OtherTable:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD recno() as OtherID, * INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OtherDate, OtherValue&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-5-12,2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-15,3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;2011-6-17,5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Link:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,Seq&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,ActivityDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Activity' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Table1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE (Link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,DepartureDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Departure' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Table2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE (Link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,ArrivalDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Arrival' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT Table2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CONCATENATE (Link)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; OtherID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,OtherDate as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,'Other' as DateType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RESIDENT OtherTable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Calendar:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(monthstart(Date),'MMM YYYY') as Month&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(makedate(2011,5,1)+recno()-1) as Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE 61&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;IslandCalendar:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,date(monthstart(IslandDate),'MMM YYYY') as IslandMonth&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(makedate(2011,5,1)+recno()-1) as IslandDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE 61&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in the script above, Table1, Table2 and OtherTable are my actual data tables.&amp;nbsp; The intent of the rest of the script is to add to this model without changing it, and for the additions to handle the linkage to a single generic calendar.&amp;nbsp; The Link table is where all this linkage happens, where all the magic happens, and then the Calendar table is the generic calendar.&amp;nbsp; The IslandCalendar table is for the alternative I mentioned, which is probably a much more common solution to this kind of problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My example has three example charts in it.&amp;nbsp; The first is a straight table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 1: sum({&amp;lt;DateType={'Activity'}&amp;gt;} Value1) // set analysis needed because ID is shared&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 2: sum({&amp;lt;DateType={'Departure'}&amp;gt;} Value2) // set analysis needed because ID is shared&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 3: sum(OtherValue) // set analysis not needed because OtherID not shared&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second chart is exactly the same except for using Month as a dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The third chart is a pivot table defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 1:&amp;nbsp; &lt;/SPAN&gt;ID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 2:&amp;nbsp; &lt;/SPAN&gt;DepartureDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 3:&amp;nbsp; &lt;/SPAN&gt;ArrivalDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension 4:&amp;nbsp; &lt;/SPAN&gt;ActivityDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 1: sum(Value1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 2: if(dimensionality()=1,sum(Value2))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then we have the island calendar alternative.&amp;nbsp; As stated in a text box on the sheet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;"An island calendar is disconnected from the rest of your data.&amp;nbsp; It's a possible alternative if using the data model solution above causes loops in your data structure.&amp;nbsp; The disadvantage is largely performance, as every expression must use an if() to link the island date back to whatever date you actually care about, which can be a very slow process compared to direct links in the data model.&amp;nbsp; The expressions would typically be more complex with an island calendar as well.&amp;nbsp; In the example, the expressions are of similar complexity, but that's because our example is particularly complex, sharing an ID across multiple tables that each have dates.&amp;nbsp; This is probably atypical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;The bottom example chart is the same either way, as it is referring directly to the underlying dates rather than either of our master calendars."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first chart with the island calendar is defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Dimension:&amp;nbsp;&amp;nbsp;&amp;nbsp; IslandDate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 1: sum(if(ActivityDate=IslandDate,Value1))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 2: sum(if(DepartureDate=IslandDate,Value2))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Expression 3: sum(if(OtherDate=IslandDate,OtherValue))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second chart is just like the first but with IslandMonth as the dimension.&amp;nbsp; And the third chart is exactly the same as the third chart with the previous solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 19:14:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286728#M106698</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-10-12T19:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286729#M106699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your post. However, I just went through another solution because I was running out of time last friday. Therefore, when I have some time I will test your code because it can be very useful for my work. When I test it, I'll give you my feedback.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again for answer me &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;TMF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 08:19:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286729#M106699</guid>
      <dc:creator />
      <dc:date>2012-10-15T08:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286730#M106700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Can you provide test for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shaik &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 08:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286730#M106700</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-15T08:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: 1 fact table, 2 date dimensions, 1 master calendar</title>
      <link>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286731#M106701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; do one thing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;LOAD &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreatedDate as LinkDate,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #737373; font-family: 'courier new', courier; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreatedDate,&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #737373; font-family: 'courier new', courier; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DepartureDate &lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;RESIDENT Data&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;CONCATENATE (test)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;LOAD &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DepartureDate as &lt;SPAN style="color: #737373; font-family: 'courier new', courier; background-color: #ffffff;"&gt;LinkDate,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #737373; font-family: 'courier new', courier; background-color: #ffffff;"&gt;CreatedDate,&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; background-color: #ffffff; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DepartureDate &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;RESIDENT Data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;drop table Data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;// create a calendar &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;load Date AS&amp;nbsp; &lt;SPAN style="color: #737373; font-family: 'courier new', courier; background-color: #ffffff;"&gt;LinkDate&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Days&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;from Calendar.qvd(qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;above transactions both will be concatenated and association with Calendar now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;please check and inform to me&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;SHAIK&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 08:30:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/1-fact-table-2-date-dimensions-1-master-calendar/m-p/286731#M106701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-15T08:30:42Z</dc:date>
    </item>
  </channel>
</rss>

