Qlik Community

QlikView Documents

Documents for QlikView related information.

PeriodWise(Past specific months) QVD Creation

neetha_p
Honored Contributor

PeriodWise(Past specific months) QVD Creation

//Past 6 months QVD:
LET v6Months = num(addmonths(today(),-6));

PastSixMonthsData:
LOAD * FROM QVD\Main.qvd(qvd)
Where Date >=$(v6Months);

STORE PastSixMonthsData into TableName_PastSixMonthsData.qvd;
DROP Table PastSixMonthsData;

//Past 12 months QVD:
LET v12Months = num(addmonths(today(),-12));

PastTwelveMonthsData:
LOAD * FROM QVD\Main.qvd(qvd)
Where Date >=$(v12Months);

STORE PastTwelveMonthsData into TableName_PastTwelveMonthsData.qvd;
DROP Table PastTwelveMonthsData;

//6 months QVD:
LET v6Months = num(addmonths(today(),-6));
LET v12Months = num(addmonths(today(),-12));


SixMonthsData:
LOAD * FROM QVD\Main.qvd(qvd)
Where Date >= $(v12Months) and Date <= $(v6Months);

STORE SixMonthsData into TableName_SixMonthsData.qvd;
DROP Table SixMonthsData;

Version history
Revision #:
1 of 1
Last update:
‎2015-01-16 06:56 AM
Updated by: