Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using beow script to load Calendar qvd from DATEDIM
LET v_QVD = 'Calendar';
$(v_QVD):
LOAD
DateId As DateId,
Date(floor(CalendarDate)) As CalendarDate,
CurrentYearMonth As YearMonth,
CurrentYearQuarter As YearQuarter,
CurrentQuarter As Quarter,
CurrentYear As Year,
ISOCurrentWeekNo As WeekNo,
ISOCurrentWeekStartDate As WeekStartDate,
ISOCurrentWeekEndDate As WeekEndDate
FROM [$(v_QSDimsPath)DateDim.qvd](qvd)
where DateId >= $(vMinDateId) and DateId <= $(vMaxDateId);
/* Creating Current Max Date variable*/
Max_Temp_Date:
Load Max(CalendarDate) as MaxDate Resident $(v_QVD);
LET vMaxDate = Date(floor(Peek('MaxDate',-1,'Max_Temp_Date')));
LET MyMessage = 'MaxDate: '& vMaxDate;
TRACE $(MyMessage);
LET vPriorDate = Num#(Date(floor(Peek('MaxDate',-1,'Max_Temp_Date')-1),'YYYYMMDD'));
LET MyMessage = 'PriorDate: '& vPriorDate;
TRACE $(MyMessage);
But I am getting this below error> Can anyone help
Unexpected token: 'DateId', expected one of: ':', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', ...: Calendar: LOAD DateId, Date(floor(CalendarDate)) As CalendarDate, CurrentYearMonth As YearMonth, CurrentYearQuarter As YearQuarter, CurrentQuarter As Quarter, CurrentYear As Year, ISOCurrentWeekNo As WeekNo, ISOCurrentWeekStartDate As WeekStartDate, ISOCurrentWeekEndDate As WeekEndDate FROM [lib://QS_Projects_BA_AMERICA_ANALYSIS/10_QVD/20_DIM/DateDim.qvd](qvd) where DateId >= and >>>>>>DateId<<<<<< <=
Hi @rathod14 ,
I think the error is happening because of the value in your vMaxDateID and vMinDateID. I can't see what the values are but if they are being created with the same functions as vMaxDate then they resolve to a date (DD/MM/YYYY) format. If they are date format then they would need to be in single quotes. '$(vMaxDateID)'
Regards
Anthony