Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
anonymous1
New 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
Employee
Employee

Re: Qlikview Master Calendar error

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

Re: Qlikview Master Calendar error

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 😕

Highlighted
Employee
Employee

Re: Qlikview Master Calendar error

 Can you send a screen shot of the error message

anonymous1
New Contributor III

Re: Qlikview Master Calendar error

 
Employee
Employee

Re: Qlikview Master Calendar error

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

Have you tried using debug mode ?