Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Lukas_H
Contributor III
Contributor III

Calender suddenly not working anymore

Hello,

i've made a qvw a while back and it worked fine. The automatic reload on the Qlikview Server worked fine. Everything worked fine until 5th of November.

I noticed in the task overview of QVS that the task for the reload of the document suddenly failed. I checked and it was the standard error message when your calender isn't working "the field 'a' can't be found".

But i don't get why? Nothing changed. Nobody besides me has access to the qvw application and i didn't change anything.

Does anybody know why qlikview does that?

 

If it helps here is the script:

LET vMinDatum = Num(floor(Peek('DATE_ACCEPTANCE', 0, 'R6_Data')));
LET vMaxDatum = Num(floor(Peek('DATE_ACCEPTANCE', -1, 'R6_Data')));

Datumsfeld:
LOAD
date($(vMinDatum) + IterNo() -1) as Datumsfeld
AutoGenerate (1)
WHILE $(vMinDatum) + IterNo() -1 <= $(vMaxDatum);

Kalender:
LOAD
Datumsfeld as DATE_ACCEPTANCE,
day(Datumsfeld) as Tag,
week(Datumsfeld) as Woche,
Month(Datumsfeld) as Monat,
Year(Datumsfeld) as Jahr,
applymap('MAP_Quartale', Month(Datumsfeld), Null()) as Quartal
Resident Datumsfeld;

DROP TABLE Datumsfeld;

 

 

The table 'R6_Data' is an SQL select from our DB.

 

Thanks in advance!

Labels (2)
1 Solution

Accepted Solutions
Victor_Alumanah
Creator
Creator

I modified your script to work with some sales data I have and it worked okay, the major difference between your script and mine is;

R6_Data:
LOAD
MIN(DATE_ACCEPTANCE) AS FIRST_DATE_ACCEPTANCE,
MAX(DATE_ACCEPTANCE) AS LAST_DATE_ACCEPTANCE
RESIDENT SalesTable;

It is as if your script has not defined where to get DATE_ACCEPTANCE from?

Here is the whole script;

R6_Data:
LOAD
MIN(DATE_ACCEPTANCE) AS FIRST_DATE_ACCEPTANCE,
MAX(DATE_ACCEPTANCE) AS LAST_DATE_ACCEPTANCE
RESIDENT SalesTable;

LET vMinDatum = Num(floor(Peek('FIRST_DATE_ACCEPTANCE', 0, 'R6_Data')));
LET vMaxDatum = Num(floor(Peek('LAST_DATE_ACCEPTANCE', 0, 'R6_Data')));

Datumsfeld:
LOAD
date($(vMinDatum) + IterNo() -1) as Datumsfeld
AutoGenerate (1)
WHILE $(vMinDatum) + IterNo() -1 <= $(vMaxDatum);

Kalender:
LOAD
Datumsfeld as DATE_ACCEPTANCE,
day(Datumsfeld) as Tag,
week(Datumsfeld) as Woche,
Month(Datumsfeld) as Monat,
Year(Datumsfeld) as Jahr
//applymap('MAP_Quartale', Month(Datumsfeld), Null()) as Quartal
Resident Datumsfeld;

DROP TABLE Datumsfeld;

While we teach we learn

View solution in original post

3 Replies
Victor_Alumanah
Creator
Creator

I modified your script to work with some sales data I have and it worked okay, the major difference between your script and mine is;

R6_Data:
LOAD
MIN(DATE_ACCEPTANCE) AS FIRST_DATE_ACCEPTANCE,
MAX(DATE_ACCEPTANCE) AS LAST_DATE_ACCEPTANCE
RESIDENT SalesTable;

It is as if your script has not defined where to get DATE_ACCEPTANCE from?

Here is the whole script;

R6_Data:
LOAD
MIN(DATE_ACCEPTANCE) AS FIRST_DATE_ACCEPTANCE,
MAX(DATE_ACCEPTANCE) AS LAST_DATE_ACCEPTANCE
RESIDENT SalesTable;

LET vMinDatum = Num(floor(Peek('FIRST_DATE_ACCEPTANCE', 0, 'R6_Data')));
LET vMaxDatum = Num(floor(Peek('LAST_DATE_ACCEPTANCE', 0, 'R6_Data')));

Datumsfeld:
LOAD
date($(vMinDatum) + IterNo() -1) as Datumsfeld
AutoGenerate (1)
WHILE $(vMinDatum) + IterNo() -1 <= $(vMaxDatum);

Kalender:
LOAD
Datumsfeld as DATE_ACCEPTANCE,
day(Datumsfeld) as Tag,
week(Datumsfeld) as Woche,
Month(Datumsfeld) as Monat,
Year(Datumsfeld) as Jahr
//applymap('MAP_Quartale', Month(Datumsfeld), Null()) as Quartal
Resident Datumsfeld;

DROP TABLE Datumsfeld;

While we teach we learn

View solution in original post

Brett_Bleess
Support (Former)
Support (Former)

Lukas, did Victor's post help you get things working again?  If so, do not forget to circle back to the thread and use the Accept as Solution button on his post to give him credit for the help and to let others know that worked for you.  One thing that is helpful on these types of posts is the actual Script/Document log if you have those running, as they generally allow folks to see exactly what is transpiring, it can be difficult to offer up explanations without that, keep that in mind for future posts.  

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Lukas_H
Contributor III
Contributor III
Author

It's working again, thanks!

But i don't get why? Your script only has the extra step of getting the max & min date in a resident statement.

And then the FIRST_DATE_ACCEPTANCE & LAST_DATE_ACCEPTANCE already contain the max and min dates. The LET = ... statement is not necessary anymore as far as i would see it.

And i still have the question why qlikview suddenly stops working...if this keeps happening it's really exhausting to automate something via QVS

 

But anyway, thanks it works and i hope it doesn't do the same thing again