# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor

## Master Calendar

Hallo!

I'm trying to make master calendar for reports.

Min date must be hard coded 20140101 and Max today + 1825 days

This is what I have:

Let vMinDate = Num(DATE('20140101');

Let vMaxDate = Num(DATE(Today()+1825);

TempCalendar:

\$(vMinDate)+IterNo()-1 as Num

AUTOGENERATE 1 WHILE \$(vMinDate)+IterNo()-1<= \$(vMaxDate);

Calendar:

num(floor(Num)) as Date,

Week(Num) as Week,

Year(Num) as Year,

Month(Num) as Month,

Num(Month(Num)) as MonthNo,

Day(Num) as Day,

Weekday(Num) as WeekDay,

Ceil(month(Num)/3) AS Quarter,

Year(Num)&'-'& Week(Num) as YearWeek

RESIDENT TempCalendar;

store......

Drop Tables TempCalendar;

The following error occurred:

The error occurred here:

?

Do you know what might be reason?

2 Replies
Honored Contributor III

## Re: Master Calendar

Here,

Try:

Let vMinDate = Num(DATE(makedate(2014,01,01)));

Let vMaxDate = Num(DATE(num(Today())+1825));

New Contributor

## Re: Master Calendar

Hi,

It works. Thank you!

Greetings!