Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more 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:
‎01-16-2015 06:56 AM
Updated by: