Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to link master calendar

Hi All,

Every time when i start work on QV project i get this issue of linking my Master Calendar with dates available in multiple tables.

This time i need to understand it correctly.

I have date field in 3 different tables and I have a Master calendar. I need to link date fields from 3 tables with Master Calendar date field.

  • I tried putting 3 different calendars for 3 tables. But this is not good programming practice.
  • Link table
  • Key concept

Appreciate any guidance on this and explanation.

Thanks,

Poonam

13 Replies
Anil_Babu_Samineni

There is no way to split from single table. But could be work using multi loads like

Fact:

LOAD Date1 as DateField, 'Date1' as Flag, Sales FROM Book1.xlsx

(ooxml, embedded labels, table is Sheet1);

Date2:

LOAD Date2 as DateField, 'Date2' as Flag, Sales FROM Book1.xlsx

(ooxml, embedded labels, table is Sheet1);

Date3:

LOAD Date3 as DateField, 'Date3' as Flag, Sales FROM Book1.xlsx

(ooxml, embedded labels, table is Sheet1);

CalendarMaster:

LOAD Date(DateField) AS Date,

Load Date(MinDate + IterNo() -1) AS Date While (MinDate + IterNo() - 1) <= Num(MaxDate);

Load Min(DateField) AS MinDate, Max(DateField) AS MaxDate RESIDENT Fact;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
pradosh_thakur
Master II
Master II

https://community.qlik.com/blogs/qlikviewdesignblog/2012/08/30/master-table-with-multiple-roles

Does this help ? HIC got a solution for you here i guess.

Learning never stops.
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, as Anil suggested, load each date in a separate load statement. There should be no difference in the pattern whether the dates are in the same or different tables.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

pnkulwal
Contributor
Contributor

Thank you rwunderlich! 

Suggested solution worked.