Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
anonymous1
Contributor III
Contributor III

Qlikview Master Calendar error

hi all,

i have a table production with the following columns:

COMPLETION_DATE,
QTY,
STATUS,
ORG_CODE,
ITEM_NO,
ITEM_TYPE

im trying to create a master calendar on the COMPLETION_DATE but keep getting a 'Field 'a' not found error'.

QuartersMap:

MAPPING LOAD
rowno() as Month,
'Q' & Ceil (rowno()/3) as Quarter
AUTOGENERATE (12);

Temp:
Load
min(COMPLETION_DATE) as minDate,
max(COMPLETION_DATE) as maxDate
Resident production;

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);

MasterCalendar1:
Load

TempDate AS COMPLETION_DATE,
week(TempDate) As P_Week,
Year(TempDate) As P_Year,
Month(TempDate) As P_Month,
Day(TempDate) As P_Day,
YeartoDate(TempDate)*-1 as P_CurYTDFlag,
YeartoDate(TempDate,-1)*-1 as P_LastYTDFlag,
inyear(TempDate, Monthstart($(varMaxDate)),-1) as P_RC12,
date(monthstart(TempDate), 'MMM-YY') as P_MonthYear,
ApplyMap('QuartersMap', month(TempDate), Null()) as P_Quarter,
Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as P_WeekYear,
WeekDay(TempDate) as P_WeekDay

Resident TempCalendar

Order By TempDate ASC;

Drop Table TempCalendar;

can anyone see what im doing wrong?

TIA

Labels (2)
5 Replies
Lisa_P
Employee
Employee

The calendar script looks ok, must be an issue somewhere else
anonymous1
Contributor III
Contributor III
Author

I have 2 other master calendars in my data model aswell, think these have something to do with the issue? it seems to not like my TempCalendar, but this is the exact same as my other 2 tempCalendars, so not sure what the issue is 😕

Lisa_P
Employee
Employee

 Can you send a screen shot of the error message

anonymous1
Contributor III
Contributor III
Author

 
Lisa_P
Employee
Employee

Is there somewhere in the script you are trying to load a field 'a' ?

Have you tried using debug mode ?