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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

getting data of last n-month data from QVD

HI

In my QVW file having an "Test" table, in that having data from 2006 to current day date(i;e;05-07-2011).

"CapDate" is the field in my table having the data like this i.e; from "01-01-2006 12:13:15" to "05-07-2011 12:13:15"

Now when i load the "Test" table then i need to have the data of  only last 2 months from current day onwards.It should have data like this i.e; 05-05-2011 to 05-07-2011.

How can i achieve this.

Regards

Venkat

2 Replies
Not applicable
Author

in the load script you can add,

WHERE CapDate>=(Today()-60))

montubhardwaj
Specialist
Specialist

You can try something like this:

table a:

Load *

From abc.qvd (qvd)

where CapDate>= Addmonths(today(),-2);

The above formula will be dynamic so you don't have to worry for no of days in a month.

Thanks,

Sharma