Discussion Board for collaboration related to QlikView App Development.
I try to store source data which are many excel spreadsheets into separate QVD files based on year of their creation. Following should be achieved:
1 QVD = 1 Year from all excel sheets
I have following code:
from $(vPathXLS)\CR_*.xlsx // load all XLS 2013, 2014 and so on
(ooxml, embedded labels, table is [INPUT ]);
max ([Year]) as MaxYear,
min ([Year]) as MinYear
Drop table Years;
LET vMaxYear = FieldValue( 'MaxYear', 1 );
LET vMinYear = FieldValue( 'MinYear', 2 );
for i = 2013 to $(vMaxYear)
FROM $(vPathXLS)\CR_*.xlsx (ooxml, embedded labels, table is [INPUT]) // loads CR_2013, 2014 and so on
STORE CR_CORE_DATA_ALL into $(vPathQVDStore) CR_DATA_$(i).qvd;
What this currently does is storing data into QVDs year by year, but every year has duplicate data in it even also for year previous.
So 2013.qvd has all data for year 2013 but 2014.qvd has data for 2013 and for 2014.
I would really like to see your input on this one. I guess I am wrong in part - (for i = .. to )
DROP TABLE CR_CORE_DATA_ALL
View solution in original post
Excellent Anjos !
Perfectly working now.