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: 
amit_saini
Master III
Master III

SET help for calculating different Year

Hi Folks,

I'm using Include statement for my 20 applications by reading a .qvs file . In this file I have set few links as:

Set vQVD = '\\TXKAPPHUT003\SourceDocuments\QV_QVD';

Set vQVD_LoadYear = 'D:\QlikView\Development\QV_QVD\$(vYear)';

Set vSRC = '\\TXKAPPHUT003\SourceDocuments\QV_SRC';

Now my requirement is that I have to read data from 2005 to 2012 as vYear , please help me how to set here value for vYear  thorough Set statement so that it will read all data one by one starting from 2005 till 2012 using 'D:\QlikView\Development\QV_QVD\$(vYear)'; link as mentioned above for Set vQVD_LoadYear.

Thanks,

AS

1 Reply
swuehl
MVP
MVP

I would create a path variable only in the include script:

Set vQVD_LoadYearPath = 'D:\QlikView\Development\QV_QVD';

Then after including the path, use a loop to load your tables in like

FOR vYear = 2005 TO 2012

LOAD * FROM

[$(vQVD_LoadYearPath)\$(vYear)\Table*.xls]

(biff, embedded labels, table is Sheet1$);

NEXT