Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create monthly QVD ?

I have a qvd file that i need to create from monthly qvd like " 201601.qvd "

How can i do this ?

46 Replies
qlikview979
Specialist
Specialist

Hi,

Please share how you want "Qvd Name".

Not applicable
Author

I have just one qvd file with Date column that contains year and month.

So for every year and every month in Date Column. Create a qvd

Example

201601.qvd

201602.qvd 

qlikview979
Specialist
Specialist

Hi,

201601.qvd

201602.qvd

201603.qvd

this is

201601(2016 jan month),

201602(2016 Feb month),

201603(2016 Mar month)



Not applicable
Author

Yes exactly like that

qlikview979
Specialist
Specialist

Hi,

In Script  Just Change thisin stead of YYYYMM   put YYYYMMM

T1:

LOAD Date,

     Date1,

     Product,

     Sales

FROM

(qvd);

let Vm=NoOfRows('T1');

for i=0 to $(Vm)-1;

LET Vmonth=Date(Peek('Date',$(i),'T1'),'YYYYMM');

LET Vday=Peek('Date1',$(i),'T1');

STORE  T1 into $(Vmonth).qvd (qvd);

NEXT i;


qlikview979
Specialist
Specialist

Hi,

In Script  Just Change thisin stead of YYYYMM   put YYYYMMM



then you will get like this

2016jan.qvd

2016Feb.qvd

2016Mar.qvd

Not applicable
Author

Is this truly the right answer ?  This will Loop for ever ??

It should just take all the months that are in the Date Column, So if there is 201601 - 201602 -201603 in Date Column

Then the qvd name should be 201601.qvd   201602.qvd and so on ??

See below log file  :

2016-06-21 10:16:30 0044 for i=0 to 33766260-1

2016-06-21 10:16:30 0046   LET Vmonth=Date(Peek('Date',0,'T1'),'YYYYMM')

2016-06-21 10:16:30 0049   STORE  T1 into 201601.qvd (qvd)

2016-06-21 10:16:37 0053 NEXT i

2016-06-21 10:16:37 0046   LET Vmonth=Date(Peek('Date',1,'T1'),'YYYYMM')

2016-06-21 10:16:37 0049   STORE  T1 into 201601.qvd (qvd)

2016-06-21 10:16:43 0053 NEXT i

2016-06-21 10:16:43 0046   LET Vmonth=Date(Peek('Date',2,'T1'),'YYYYMM')

2016-06-21 10:16:43 0049   STORE  T1 into 201601.qvd (qvd)

2016-06-21 10:16:50 0053 NEXT i

2016-06-21 10:16:50 0046   LET Vmonth=Date(Peek('Date',3,'T1'),'YYYYMM')

2016-06-21 10:16:50 0049   STORE  T1 into 201601.qvd (qvd)

2016-06-21 10:16:57 0053 NEXT i

2016-06-21 10:16:57 0046   LET Vmonth=Date(Peek('Date',4,'T1'),'YYYYMM')

2016-06-21 10:16:57 0049   STORE  T1 into 201601.qvd (qvd)

2016-06-21 10:17:04 0053 NEXT i

2016-06-21 10:17:04 0046   LET Vmonth=Date(Peek('Date',5,'T1'),'YYYYMM')

2016-06-21 10:17:04 0049   STORE  T1 into 201601.qvd (qvd)

2016-06-21 10:17:11 0053 NEXT i

2016-06-21 10:17:11 0046   LET Vmonth=Date(Peek('Date',6,'T1'),'YYYYMM')

2016-06-21 10:17:11 0049   STORE  T1 into 201601.qvd (qvd)

2016-06-21 10:17:17 0053 NEXT i

2016-06-21 10:17:17 0046   LET Vmonth=Date(Peek('Date',7,'T1'),'YYYYMM')

2016-06-21 10:17:17 0049   STORE  T1 into 201601.qvd (qvd)

Not applicable
Author

This does not work  , it loops forever.

It should just take all the months that are in the Date Column, So if there is 201601 - 201602 -201603 in Date Column

Then the qvd name should be 201601.qvd   201602.qvd and so on.

Anil_Babu_Samineni

Tamil,

What are these indicates.

Let vMinDate = Date(Peek('MinDate',0,'Max'),'YYYYMM');
Let vMaxDate = Date(Peek('MaxDate',0,'Max'),'YYYYMM');
Let vMinMonth = Date(Peek('MinMonth',0,'Max'),'YYYYMM');
Let vMaxMonth = Date(Peek('MaxMonth',0,'Max'),'YYYYMM');

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

Akintosh,

You want to bifurcate after loading or what?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful