Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Master calender creation

How can i create master calendar? And for Eg. today, yesterday, day after yesterday how may i extend in mater calendar like this pattern can anyone briefly explain?

2 Replies

Re: Master calender creation

Have you already looked at some of the other posts on related to creation of Master Calendar?

Creating A Master Calendar

New Contributor II

Re: Master calender creation

Hi Rambabu,

Use below links



or Use following script

//***********CREATE VARIABLES***********

LET varMinDate = Num(Peek('Date',0,'TableName'));

LET varMaxDate = Num(Peek('Date',-1,'TableName'));

LET varToday = Num(Today());

//***********TEMPORARY CALENDAR***********



$(varMinDate) + RowNo() -1 as Num,

date($(varMinDate) + RowNo() -1) as TempDate


$(varMaxDate) - $(varMinDate) + 1;

//***********MASTER CALENDAR***********



  TempDate as OrderDate,

  Week(TempDate) as Week,

  Year(TempDate) as Year,

  Month(TempDate) as Month,

  Day(TempDate) as Day,

  WeekDay(TempDate) as WeekDay,

  'Q' & Ceil(Month(TempDate)/3) as Quarter,

  Date(MonthStart(TempDate), 'MMM-YYYY') as MonthYear,

  Week(TempDate)&'-'&Year(TempDate) as WeekYear,

  InYearToDate(TempDate,$(varToday),0) * -1 as CurYTDFlag,

  InYearToDate(TempDate,$(varToday),-1) * -1 as LastYTDFlag

Resident TempDateField

Order By TempDate Asc;

DROP Table TempDateField; 

Community Browser