Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Let command

I have a qlikview script which has worked for years, but suddenly in the last two weeks it's stopped working. I have determined for some reason the script doesn't want to pick up the variable for the where field, and is coming back with "field not found". I am currently using Qlikview 10. Any idea's on how I can fix this.

If I remove the where clause it works fine, but off course my report is broken then.

Thanks.

Latest_Stock_Date:
LOAD

MAX([_Stock Date]) as [LatestDate]

RESIDENT Stock_Data2;

LET vQVDHistoryDate = fieldValue('LatestDate',1)-1;

// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// Load all (historic) data prior to the above date from the QVD file.  This goes into the Stocks_and_Orders table...
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Stocks_and_Orders:
LOAD

[Plant],
[Storage Location],
[Material Number],
[Stock Date],
[Stock Level],
[Order Date],
[Order Quantity]

FROM Traceability.qvd (qvd) WHERE [Stock Date]<=$(vQVDHistoryDate);

3 Replies
Not applicable
Author

Please check the date format below script

Load Max([_Stock Date]) as [LatestDate] Resident Stock_Date2;

Regards,

Venkat Reddy

Not applicable
Author

In order to prevent confusion i use a number to represent the date, in this case its 41001.

Not applicable
Author

Same script i am running in QV 9.0.It's Working fine and  variable store the Date in number format.