Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

laxmanqlik
Contributor

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

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

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

rahulpawarb
Valued Contributor II

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

Hello Laxman,

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


Regards!

Rahul

laxmanqlik
Contributor

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

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.