Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
przemyslaw_r
Contributor II
Contributor II

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
Partner - Master III
Partner - Master III

Here,

Try:

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

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

przemyslaw_r
Contributor II
Contributor II
Author

Hi,

It works. Thank you!

Greetings!