Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Field Not Found Error Message when Building Master Calendar

Hello,

I am building a Master Calendar and keep receiving an error message <<=> Field not found. I beleive it is referring to this part of my script "AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate); "

Anyone Knows what could be causing this? When I use an Inline load this seems to not be an issue, but when I load the script from an Excel file, I get this issue. Any ideas?

Data:

Load
    
Period
FROM

[LOAD FILES\SOAR\01 JUL 2013\Data_1397860256062.csv]
(
txt, codepage is 1252, embedded labels, delimiter is ',', msq);

MAPPING LOAD  
rowno() as Month
'Q' &
Ceil (rowno()/3) as Quarter 
AUTOGENERATE (12); 
 

Temp: 
Load 
min(Period) as minDate
              
max(Period) as maxDate 
Resident Data; 

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)

1 Solution

Accepted Solutions
maxgro
MVP
MVP

add an

exit script;

statement after dtop table to identify where you have the error (or debug)

it seems correct, I just replace your first statement with that and it works without error

Data:

Load

   (floor(today()+rowno())) as Period

autogenerate 730

;

View solution in original post

2 Replies
maxgro
MVP
MVP

add an

exit script;

statement after dtop table to identify where you have the error (or debug)

it seems correct, I just replace your first statement with that and it works without error

Data:

Load

   (floor(today()+rowno())) as Period

autogenerate 730

;

Not applicable
Author

Thank you, it looks like I am getting the error b/c the min/max dates are not formating correctly and pulling in null value. I will work on getting the formatting fixed and see if that resolves.