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: 
Anonymous
Not applicable

To split dates on QVD and move remaining to separate QVD

I Have a QVD which has Accounting Period column contains a list of 2 years data  MMYYYY(i.e;012015)

How to write logic to remove all old data (more then 6 months old)from the current Month-Year to previous 6 month QVDs

and move them into Seperate QVD.

12 Replies
Anonymous
Not applicable
Author

from Temp.qvd(qvd)

AccPrdOGIS consists of YYYYMM Format like 201501

its_anandrjs
Champion III
Champion III

Hi,

For Yearly Qvd creation you can get help from this Document this creates Yearly QVD.

Year Wise Qvd creation from Source Data

Regards

Anand

Anonymous
Not applicable
Author


Hi,

Try:

LOAD Distinct Year(date#(AccPrdOGIS,'YYYYMM')) AS YearField,

date(date#(AccPrdOGIS, 'YYYYMM')) as PeriodStartMonth,

date(floor(MonthEnd(date#(AccPrdOGIS, 'YYYYMM')))) as PeriodEndMonth,

year(date#(AccPrdOGIS, 'YYYYMM')) as PeriodYear,

ceil(month(date#(AccPrdOGIS, 'YYYYMM'))/3) as PeriodQuarter,

year(date#(AccPrdOGIS, 'YYYYMM')) & ceil(month(date#(AccPrdOGIS, 'YYYYMM'))/3) as PeriodYearQuarter



FROM



(
qvd)

Order by Year(date#(AccPrdOGIS,'YYYYMM')) asc;

EXIT Script;