Qlik Community

Qlik Sense App Development

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

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP & Luminary
MVP & Luminary

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

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Highlighted
Specialist III
Specialist III

Hello Laxman,

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


Regards!

Rahul

Highlighted
Creator II
Creator II

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.