Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hey,
what is master calender and how to use it. Can you give me some scenario.
If you have a fact table or there is transaction dates or common dates which is running in the system and that is the main date then you have to connect this date to any master calendar like if you need date dimensions or field like
Month,Year,Week,Weekstart,Quarter and etc many more normally the tables not keept this fields then we use master calendar.
See the Master Calendar Script
=======================
Let varMinDate = Num(Makedate(2006,1,1));
Let varMaxDate = Num(Makedate(Year(today()),Month(today()),Day(today())));
Datefield:
LOAD
Date($(varMinDate)+IterNo()-1) AS CommonDatefield,
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);
In this CommonDateField is attached to the fact table date field.
This video should help.
Hi,
Check the attached document. It explains how to.