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

Problem loading master calendar

I used the following script to create master calendar following the instructions on Understanding the Master Calendar - Qlik Sense and QlikView - YouTube. Program won't load the data. It says after 45 min that I'll need to fix something (didn't specify). Any suggestions where the problem could be? Submit Date is the column name that has the dates.

QuartersMap:

MAPPING LOAD 

rowno() as Month,

'Q' & Ceil (rowno()/3) as Quarter

AUTOGENERATE (12);

    

Temp:

Load

min([Submit Date]) as minDate,

max([Submit Date]) as maxDate

Resident Basics;

    

Let varMinDate = Num(Peek('minDate', 0, 'Temp'));

Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));

DROP Table Temp;

    

TempCalendar:

LOAD

$(varMinDate) + Iterno()-1 As Num,

Date($(varMinDate) + IterNo() - 1) as TempDate

AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);

    

MasterCalendar:

Load

  TempDate AS [Submit Date],

  week(TempDate) As Week,

  Year(TempDate) As Year,

  Month(TempDate) As Month,

  Day(TempDate) As Day,

  ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,

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

  WeekDay(TempDate) as WeekDay

Resident TempCalendar

Order By TempDate ASC;

Drop Table TempCalendar;

1 Reply
Not applicable
Author

There's autocalendar in the Auto-generated section which seems to have week, month, year fields generated so could this be preventing the master calendar from functioning properly?