Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
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 (3)
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

View solution in original post

shakeeb_mohammed
Contributor III
Contributor III
Author

Thank you!