Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

przemyslaw_r
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:

LOAD

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

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

Calendar:

LOAD

  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;

Problem appears when I'm loading data:

The following error occurred:

Field '<=' not found

The error occurred here:

?

Data has not been loaded. Please correct the error and try loading again.

Do you know what might be reason?

2 Replies
shraddha_g
Honored Contributor III

Re: Master Calendar

Here,

Try:

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

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

przemyslaw_r
New Contributor

Re: Master Calendar

Hi,

It works. Thank you!

Greetings!

Community Browser