Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to know my mistake in this script.
//hour
TempCalendar:
LOAD DayStart(TimeStamp($(vMinDate) + (RecNo()/60/24) + (IterNo() -1))) AS DateNumber,
TimeStamp($(vMinDate) + (RecNo()/60/24) + (IterNo() -1)) AS TempDate
AUTOGENERATE 1439 WHILE Num($(vMinDate) + IterNo() -1) <= Num($(vMaxDate));
vMaxDate is being evaluated as nothing. Where is this set in your code?
Actually both variables are being evaluated as nothing.
If this is being set correctly, try putting your ($vMinDate) in single quotes: '($vMinDate)'
Sorry, here is the complete code
Min_Max_Dates:
LOAD
Floor(Min(TimeStamp#(eDate, 'MM/DD/YYYY hh:mm'))) AS MinDate,
Floor(Max(TimeStamp#(eDate, 'MM/DD/YYYY hh:mm'))) AS MaxDate
RESIDENT LinkTable_Temp;
LET vMinDate = FieldValue('MinDate', 1);
LET vMaxDate = FieldValue('MaxDate', 1);
//LET vMinDate = Num(Peek('MinDate', 0, 'Min_Max_Dates'));
//LET vMaxDate = Num(Peek('MaxDate', -1, 'Min_Max_Dates'));
//hour
TempCalendar:
LOAD DayStart(TimeStamp($(vMinDate) + (RecNo()/60/24) + (IterNo() -1))) AS DateNumber,
TimeStamp($(vMinDate) + (RecNo()/60/24) + (IterNo() -1)) AS TempDate
AUTOGENERATE 1439 WHILE Num($(vMinDate) + IterNo() -1) <= Num($(vMaxDate));
Calendar:
LOAD
TempDate AS eDate,
Hour(TempDate) AS CalenderHour,
Minute(TempDate) AS CalenderMinute,
// Standard Date Objects
Date( Floor(TempDate)) AS CalendarDate,
Day(TempDate) AS CalendarDayOfMonth,
Month(TempDate) AS CalendarMonthName,
'Q' & Ceil(Month(TempDate)/3) AS CalendarQuarter,
Year(TempDate) AS CalendarYear,
// Combo Date Examples
'Q' & Ceil(Month(TempDate)/3) & '/' & Year(TempDate) AS CalendarQuarterAndYear,
Year(TempDate) & '/' & 'Q' & Ceil(Month(TempDate)/3) AS CalendarYearAndQuarter,
'Wed ' & DayStart(WeekStart(TempDate) + 3) as CalendarWednesdays
RESIDENT TempCalendar ORDER BY TempDate ASC;
DROP TABLE TempCalendar;
DROP Table Min_Max_Dates;
Check your Variables for vMinDate and vMaxDate
Check your Min_Max_Dates table
comment out the Drop Table Min_Max_Dates and then see if it's populating the correct result
by putting the this variable in single quotes '$(vMinDate)' or '($vMinDate)' it has eliminate the error but its not returning 0 rows.
reload script itself is failing with the above error. In Fact this code was working in Qlik 9 version. Because i copied this slice of code from my previous app.
The above code was from Calendar with time (timestamp)