Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

error when reloading

I am getting a script line error when reloading my qvd file. the error message is in the image attached

40 Replies
simenkg
Specialist
Specialist

It would help me if you paste scripting as text instead of images so I can just edit it.

[TempCalendar]:
load

     Date('$(vMinDate)'+RowNo() - 1)      as TempDate
AutoGenerate

     ('$(vMaxDate)'-'$(vMinDate)'+1)
;

Not applicable
Author

Script line error:

[TempCalendar]:

Load

  Date(''+RowNo() - 1) as TempDate

  AutoGenerate

  (''-''+1)

simenkg
Specialist
Specialist

Can you paste the lines where vMinDate and vMaxDate are defined?

Not applicable
Author

Is this where its defined?

[MinMax]:

Load

  Min(ServiceDate) as MinDate

  ,Max(ServiceDate) as MaxDate

Resident

  [CensusFact];

  Let vMinDate = Num(Peek('MinDate',0,'MinMax'));

  Let vMaxDate = Num(Peek('MaxDate',0,'MinMax'));

  // -- Variable used in UI for variance calculations -- //

  Let vCurrentMonth = Date(MonthStart(Date(Peek('MaxDate', 0, 'MinMax'))), 'MMM YYYY');

  Let vMaxWeek = If(MonthName(WeekEnd('$(vMaxDate)')) = MonthName(WeekStart('$(vMaxDate)')),

  Date(WeekStart(Peek('MaxDate', 0, 'MinMax'))), Date(WeekStart(Peek('MaxDate', 0, 'MinMax')) - 7));

simenkg
Specialist
Specialist

Yes, however I cannot see the error immediately. Could you copy all the text on that tab and save it as a text document and attach it so I can test it. 

Not applicable
Author

Attached is the text file. Thank you so much also if you could tell me how you fixed it and what the problem was, I would appreciate that. THANKS AGAIN

simenkg
Specialist
Specialist

Thanks, however the script runs fine for me.

Lets try one more thing first.

Insert "Exit script;" at this location.

[MinMax]:

Load

  Min(ServiceDate) as MinDate

  ,Max(ServiceDate) as MaxDate

Resident

  [CensusFact];

Exit script;

Then run the script and open the table viewer by pressing the button in the attached image. Then right-click the MinMax-table and press "Preview".

Could you take a screenshot of the resulting table?

Not applicable
Author

This ran but the qvw is now empty can I send you the qvd file?

simenkg
Specialist
Specialist

Is there no table named MinMax in the TableViewer?

Not applicable
Author

when I insert exit script, yes but then only the minmax and census fact tables are showing. its missing 3 other tables