Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
First time poster here in the community. I have the following script I'm trying to use, but I keep getting the Field Not Found error. I can't seem to find the issue here, but it does appear to be in my MasterCalendar table. Any help would be appreciated.
LET vMinDate = NUM(MAKEDATE(1900,1,1));
LET vMaxDate = NUM(MAKEDATE(2999,12,31));
Temp:
LOAD
$(vMinDate) + ITERNO() - 1 AS DateID,
DATE($(vMindate) + ITERNO() - 1) AS TempDate
AUTOGENERATE 1 WHILE $(vMinDate) + ITERNO() - 1 <= $(vMaxDate);
MasterCalendar:
LOAD
TempDate,
TempDate AS CalendarDate,
WEEK(TempDate) AS Week,
YEAR(TempDate) AS Year,
MONTH(TempDate) AS Month,
DAY(TempDate) AS Day,
'Q' & CEIL(MONTH(TempDate)/3) AS Quarter
RESIDENT Temp
ORDER BY TempDate ASC;
DROP TABLE Temp;
I just copy-pasted the above code in an empty QlikView application and run the script.
I do not get any errors.
My assumption is that you have more code in your script than the part you are showing here and that the problem actually is caused there.
If I have this happen in my regular QlikView Developer class, I would go look at the previous page of your script as I assume you are using "QUALIFY *;" somewhere in your script and forgot to close it with an "UNQUALIFY *;".
Doesn't it tell you the name of the field not found? "Field not found < Field >"
Your script does not have any other LOAD statements after above code snippet?
Have you checked the variables vMinDate / vMaxDate and have you run the script in debug mode?
your script seems correct and it works in my qlikview
could you post the error?
Hi Jason,
Can you attach a sample QVF or QVW so that it would be easy to solve the issue?
Hello Everyone,
Thanks guys for your support! I was actually able to fix my issue by just changing the order of how things ran for some strange reason. For example, I had a database connection bringing in a couple of tables, then an excel spreadsheet load, and then the master calendar code. I did look over all of it and checked for the things you all mentioned and nothing. I ended up running my master calendar code first in the sequence and for whatever reason that fixed it. Appreciate the responses.
Thanks, Jason