Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shakeeb_mohammed
Contributor III
Contributor III

Limit data load with date field

Hi , 

 

I have a large QVD which is getting built from a database - i have some miscellaneous date fields which is messing up with my application - e.g. i may have a date field from years 1999 and in some cases 2099. I want to put in my script only load data from today's date and 94 days going back. Can someone help me write this script please? 

Labels (1)
1 Solution

Accepted Solutions
amrinder
Creator
Creator

Hi Shakeeb,

 

First create a variable like this:

Let vToday= Date(Today()-94,'DD/MM/YYYY');


Then while loading QVD in where clause pass this variable llike this:

Load

CustomerID,

ProductID,

BillingDate

From ABC.qvd  where Date>='$(vToday)';

 

Hope it helps.

 

-amrinder

View solution in original post

2 Replies
amrinder
Creator
Creator

Hi Shakeeb,

 

First create a variable like this:

Let vToday= Date(Today()-94,'DD/MM/YYYY');


Then while loading QVD in where clause pass this variable llike this:

Load

CustomerID,

ProductID,

BillingDate

From ABC.qvd  where Date>='$(vToday)';

 

Hope it helps.

 

-amrinder

shakeeb_mohammed
Contributor III
Contributor III
Author

Thank you!