Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following script in Sense:
calendar:
LOAD
min([CalendarDate]) as minDate,
max([CalendarDate]) as maxDate
Resident telemetry;
LOAD
%DATE_KEY,
CalendarDate,
CalendarDayOfMonth,
CalendarDayName,
CalendarWeekOfYear,
CalendarMonthName,
CalendarQuarter,
CalendarYear,
CalendarWeekNumberAndYear,
CalendarMonthAndYear,
CalendarQuarterMonthsAndYear,
CalendarDayStart,
CalendarWeekStart,
CalendarMonthStart,
CalendarQuarterStart,
CalendarYearStart,
CalendarDayEnd,
CalendarWeekEnd,
CalendarMonthEnd,
CalendarQuarterEnd,
CalendarYearEnd,
CalendarQuarterAndYear,
CalendarYearAndQuarter,
CalendarWednesdays,
%Fiscal_Key,
FiscalMonthNum,
FiscalYearDesc,
FYRPR,
FiscalYear,
FiscalYearQuarter
FROM [lib://XXX/MASTER_CALENDAR_DIM.qvd]
(qvd)
WHERE CalendarDate => minDate AND CalendarDate <= [maxDate];
It dies on a field not found error, at the WHERE statement. Seems it does not like minDate or maxDate, and I can't seem to be able to find a way to get Sense to point to the minDate and maxDate values called earlier in the Table script.
Any ideas?
Hi Chris,
fields from a data table cannot be used directly in another table load. Instead, you should "peek" the field values into variables, and then use the variables in the subsequent LOAD. Something like this:
If you'd like to learn more about variables and other advanced data load features, check out my new book QlikView Your Business.
cheers,
Oleg Troyansky