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 ?

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Try this,

MyQvd:
LOAD *, Date(Date,'YYYYMM') as YearMonth 
FROM
source.qvd
(
qvd);

Temp:
Load Distinct YearMonth
Resident Temp;

let Vm=NoOfRows('Temp');

for I=0 to $(Vm)-1;
LET vFileName=Peek('YearMonth',$(I),'Temp');

Table:

NoConcatenate
Load * resident MyQvd
where YearMonth = '$(vFileName)';

STORE  Table into $(vFileName).qvd (qvd);

drop table Table;
NEXT I;

DROP Table Temp, MyQvd;

View solution in original post

46 Replies
tamilarasu
Champion
Champion

You can try like below,


Let vDate= Date(Today(),'YYYYMM');

MyQVD:

Load...

From qvd;

STORE MyQVD INTO $(vDate).qvd;

sushil353
Master II
Master II

let vYear = 2016;

let vMonth = 1;

for I=0 to 11

let vQVDFileName = $(vYear)&$(vMonth);

Store TableName into $(vQVDFileName).qvd(qvd);

next I ;

HTH

Sushil

Not applicable
Author

I need to create it from the Date Column in the Qvd file which is called Date.

tamilarasu
Champion
Champion

What is the date format for the column "Date".?

Not applicable
Author

Its numbers, but my TimeStampformat in the qvw is " YYYY-MM-DD "

tamilarasu
Champion
Champion

Could you share some example qvd.? It would be easy for me to help further.

qlikview979
Specialist
Specialist

Hi Akintosh,

I hope this is help full to you.

T1:

LOAD Date,

Day(Date) as Date1,

     Product,

      Sales

   

      FROM

(ooxml, embedded labels, table is Sheet1);

let Vm=NoOfRows('T1');

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

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

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



STORE  T1 into D:\W-905\Personal\DAILY QVDS\Month\$(Vmonth).qvd (qvd);   

//////STORE  T1 into D:\W-905\Personal\DAILY QVDS\Month\New folder\$(Vmonth)_$(Vday).qvd (qvd); 

NEXT i;

Note:-  If you uncomment the  Second store command you will get Daily Qvd also.

Here My Date format is like  "MM/DD/YYYY". instead of my date format give your  date format.

Regards,

Mahesh

Not applicable
Author

Capture.PNG

And some other columns,

Not applicable
Author

Hello Mahesh, thank you for the answer.

The file source is a QVD file and has a Date,Year,Month and some other columns,

and the output should be YEARMONTH.qvd    for example:  201601.qvd