Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I created this statement which works fine in a regular script but it doesn't work in the QlikView components CalendarExtFields. Please review the red part,
// Sample of adding fields to Calendar
,week(Date) as [$(_fieldPrefix)Week]
,WeekYear(Date) & '-' & week(Date) as [$(_fieldPrefix)Year-Week]
,InMonth(Date, floor(today(0)), 0) as [$(_fieldPrefix)ActualMonth]
I get an Unknown statement error.
Michiel, this function uses 4 parameters. The 4th parameter controls the offset for the AddMonths function. Try if your script works if you let the 4th parameter empty.
What do you see in the logfile of the document?
It's working in the test QVW :
Sander,
I use the calendar from field statement, maybe that's the wrong one for use with extension fields.
Error occurs in a different place apparently.
Error in expression:
AddMonths takes 2-3 parameters
LOAD
Date as [Werkdag],
Day(Date) as [ExtFields CalendarDag],
Weekday(Date) as [ExtFields CalendarWeek-Dag],
Year(AddMonths(Date,)) as [ExtFields CalendarJaar],
Month(Date) as [ExtFields CalendarMaand],
'Q' & Ceil(Month(AddMonths(Date,)) / 3) as [ExtFields CalendarKwartaal],
num(Date) as [ExtFields Calendar_DateSerial],
AutoNumber(MonthStart(Date),'[ExtFields Calendar_MonthSerial]') as [ExtFields Calendar_MonthSerial],
AutoNumber(QuarterStart(Date),'[ExtFields Calendar_QuarterSerial]') as [ExtFields Calendar_QuarterSerial],
AutoNumber(weekyear(Date) &'|' & week(Date),'[ExtFields Calendar_WeekSerial]') as [ExtFields Calendar_WeekSerial]
,week(Date) as [ExtFields CalendarWeek]
,WeekYear(Date) & '-' & week(Date) as [ExtFields CalendarYear-Week]
,InMonth(Date, floor(today(0)), 0) as [ExtFields CalendarActualMonth]
Michiel, this function uses 4 parameters. The 4th parameter controls the offset for the AddMonths function. Try if your script works if you let the 4th parameter empty.