Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
pbriggs11
Contributor II
Contributor II

Date as a Variable in load script

Hi All,

Recently moved over from Qlikview to QlikSense Cloud and running across a weird issue when setting a variable using a date.  When I run the script below, it does not filter out the data to pull records prior to 12/31/23.  When I remove the variable and use a where clause with '12/31/23', the records are pulled properly.  Am I missing something simple?

-----------------------------------------------------------------------------
Let vHistoricalDate = '12/31/23';

PAYROLLBATCH_EMPLOYEE_HISTORICAL:
LOAD
*,
'Historical Load' as Load_Source
Resident Pre_PAYROLLBATCH_EMPLOYEE_Historical
Where BatchInvoiceDate <= $(vHistoricalDate);

---------------------------------------------------------------------------------

Labels (5)
1 Solution

Accepted Solutions
Antoine04
Partner - Creator III
Partner - Creator III

Maybe try like this, with single ' :

Where BatchInvoiceDate <= '$(vHistoricalDate)';

Let me know if it works ?

Regards

Antoine

View solution in original post

2 Replies
Antoine04
Partner - Creator III
Partner - Creator III

Maybe try like this, with single ' :

Where BatchInvoiceDate <= '$(vHistoricalDate)';

Let me know if it works ?

Regards

Antoine

pbriggs11
Contributor II
Contributor II
Author

That did the trick, thank you Antoine!