Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to split QVD generator year wise

Hi,

Instead of adding all the data in QVD file, have to load qvds based on splitting the calendar year.

Which need to be done using For Next loop.

EG: Fact contains 5 years of data.

So I need separate QVD for each year which need to be done through For loop.

Please help me in how to achieve the above logic

Thanks & Regards,

Shobharani

4 Replies
Not applicable
Author

Hi,

for i=2013 to 2014
test:
LOAD Quantity,
     Customer,
     City,
     Year
FROM

(biff, embedded labels, table is Sheet1$) where Year=$(i);


store test into test_$(i).qvd;


next

Regards

Ashish

Not applicable
Author

Hi Ashish kumar,

Thanks for the reply!!!

How to concatenate splitted qvd's in 1 qvw using for next loop..

Thanks & Reagrds,

Shobharani

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Test:

LOAD Quantity,

     Customer,

     City,

     Year

AUTOGENERATE (0);

for i=2013 to 2014

Concatenate(Test)

LOAD Quantity,

     Customer,

     City,

     Year

FROM

test_$(i).qvd (qvd);

next


Regards,

Jagan.

Anonymous
Not applicable
Author

You can also use

LOAD Quantity,

     Customer,

     City,

     Year

FROM

test_*.qvd (qvd);

In this way also data can be concatenated , so no need for for loop.