Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Master Calendar

What is the use of Master Calendar?

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Hi,

If you need the rest of the date dimensions and you have only Date field so from this you can create rest of the dimensions.

MonthStart,

Monthend,

Quarter,

Year,

Month,

Ex:-  For master calendar

Let varMinDate = Num(Makedate(2001,1,1));

Let varMaxDate = Num(Makedate(Year(today()),Month(today()),Day(today())));

Datefield:

LOAD

date($(varMinDate)+IterNo()-1) AS Datefield,

Month(Floor($(varMinDate)+IterNo()-1))           as Floordate,

Week(date($(varMinDate)+IterNo()-1))             as Week,

Week(date($(varMinDate)+IterNo()-1) - 55)      as NewWeek,

Year(date($(varMinDate)+IterNo()-1))               as Year,

Month(date($(varMinDate)+IterNo()-1))            as Month,

Day(date($(varMinDate)+IterNo()-1))               as Day,

Time(date($(varMinDate)+IterNo()-1))              as Time,

'Q' & ceil(month(date($(varMinDate)+IterNo()-1)) / 3)         as Quarter

AUTOGENERATE (1)

WHILE $(varMinDate)+IterNo()-1<= $(varMaxDate);

Regards,

Anand

View solution in original post

5 Replies
its_anandrjs
Champion III
Champion III

Hi,

If you need the rest of the date dimensions and you have only Date field so from this you can create rest of the dimensions.

MonthStart,

Monthend,

Quarter,

Year,

Month,

Ex:-  For master calendar

Let varMinDate = Num(Makedate(2001,1,1));

Let varMaxDate = Num(Makedate(Year(today()),Month(today()),Day(today())));

Datefield:

LOAD

date($(varMinDate)+IterNo()-1) AS Datefield,

Month(Floor($(varMinDate)+IterNo()-1))           as Floordate,

Week(date($(varMinDate)+IterNo()-1))             as Week,

Week(date($(varMinDate)+IterNo()-1) - 55)      as NewWeek,

Year(date($(varMinDate)+IterNo()-1))               as Year,

Month(date($(varMinDate)+IterNo()-1))            as Month,

Day(date($(varMinDate)+IterNo()-1))               as Day,

Time(date($(varMinDate)+IterNo()-1))              as Time,

'Q' & ceil(month(date($(varMinDate)+IterNo()-1)) / 3)         as Quarter

AUTOGENERATE (1)

WHILE $(varMinDate)+IterNo()-1<= $(varMaxDate);

Regards,

Anand

Not applicable
Author

can u get me a exact definition of master calender?

ashfaq_haseeb
Champion III
Champion III

its_anandrjs
Champion III
Champion III

Hi,

There are many uses of this

1. If there are many dates and you want to create the single common date then you can use the master calendar.

2. Only date field is available and rest of the date dimension not available.

3. The future and past date is not available in the model for analysis.

etc

For more you can read this post

http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/16/the-master-calendar

Regards

Anand

Not applicable
Author

You can read one of this best website also for how to create the Master Calendar and what is the use.

www.qlik4life.com/master-calendar-creation-in-qlikview/