Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mahichowdary
Contributor II
Contributor II

How to create master calendar ?

Could you please explain How to create master calendar with example ?

2 Replies
alexandros17
Partner - Champion III
Partner - Champion III

LET varMinDate = AddMonths(Today(),-6); //Num(Peek('DataEvento', 0, 'TabEvento'));
LET varMaxDate = Today(); //Num(Peek('DataEvento', -1, 'TabEvento'));
LET vToday = Num(today());
//*************** Temporary Calendar ***************
TempCalendar:
LOAD
$(varMinDate)+IterNo()-8 AS Num,
Date($(varMinDate)+IterNo()-8,'DD/MM/YYYY') AS TempDate
AUTOGENERATE 1 WHILE $(varMinDate)+IterNo()-8<= $(varMaxDate);
//*************** Master Calendar ***************
MasterCalendar:
NoConcatenate
LOAD
TempDate,
WeekYear(TempDate) * 100 + week(TempDate) AS YearWeek,
WeekYear(TempDate) AS Year,
Year(TempDate) * 100 + month(TempDate) AS YearMonth,
day(TempDate) AS Day,
weekday(TempDate) AS WeekDay
RESIDENT TempCalendar
ORDER BY TempDate Asc;
DROP Table TempCalendar;

swuehl
MVP
MVP