Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What is the use of Master Calendar?
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
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
can u get me a exact definition of master calender?
Hi,
Check this
http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/16/the-master-calendar
Regards
ASHFAQ
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
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/