Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
cjliew
Contributor III
Contributor III

Script to load 12 months data

Dear all,

Any idea what is wrong with my script below?

It wouldn't filter and take in last 12 months data, it will load everything in.

Attached the sample data.

Below are my script:

Let vDate = Date(AddMonths(MonthStart(Today()), -12), 'M/D/YYYY');

LOAD
"Mandator (Code)",
"First Edit Date - Head",
"Main Sales Order No.",
"Order Value (Sales Value)"

FROM [lib://Finance/Open Sales Order/All OpenSalesOrder_Cognos11 (Also not open)/Current Year/Sample Data.xlsx]
(ooxml, embedded labels, table is page)
Where "First Edit Date - Head" > $(vDate);

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try this where statement :

Where "First Edit Date - Head" > '$(vDate)' 

View solution in original post

2 Replies
Vegar
MVP
MVP

Try this where statement :

Where "First Edit Date - Head" > '$(vDate)' 

cjliew
Contributor III
Contributor III
Author

Thanks a lot, it did solved my problem:)