Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
laxmanqlik
Creator II
Creator II

Field not found error while loading master calendar script...

Hi Everyone ,

i am getting the "Field '<=' not found" error while loading the Master calendar script.

below is the script what i am running

QuartersMap: 

MAPPING LOAD  

rowno() as Month, 

'Q' & Ceil (rowno()/3) as Quarter 

AUTOGENERATE (12); 

 

Temp: 

Load 

               min(UPDATEDATE) as minDate,  //UPDATEDATE is the name of the date field which i have and it in YYYY/MM/DD formate

               max(UPDATEDATE) as maxDate 

Resident Reports; 

 

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);

 

MasterCalendar: 

Load 

               TempDate AS UPDATEDATE, 

               week(TempDate) As Week, 

               Year(TempDate) As Year, 

               Month(TempDate) As Month, 

               Day(TempDate) As Day, 

               YeartoDate(TempDate)*-1 as CurYTDFlag, 

               YeartoDate(TempDate,-1)*-1 as LastYTDFlag, 

               inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12, 

               date(monthstart(TempDate), 'MMM-YYYY') as MonthYear, 

               ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter, 

               Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear, 

               WeekDay(TempDate) as WeekDay 

Resident TempCalendar 

Order By TempDate ASC; 

Drop Table TempCalendar; 

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Check if the variables are getting the correct values.

The error is occurring while loading the TempCalendar Last statement, where it is not getting value for the Max Variable.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
rahulpawarb
Specialist III
Specialist III

Hello Laxman,

I agree with Kaushik. You can validate the values of variables and do the needful.


Regards!

Rahul

laxmanqlik
Creator II
Creator II
Author

thanks and the reason for the error is Date format of m date field is YYYYMMDD, so Temp table nit fetching the the min and max dates from the date field.

i converted the date format in to DD/MM/YYYY and then its working fine.