Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to concatenate a QVD to other QVD based on the condition?

Hi,

I need to concatenate a QVD to other QVD based on the month end of "Month_date" column

CurrentData:

LOAD Id,

          Department,

          Month_date

From Dummy.xlsx(ooxml, embedded labels);

STORE CurrentData into CurrentData.qvd(qvd);

If  MonthEnd(Month_date) then

Concatenate CurrentData.qvd(qvd) to HistoricalData.qvd(qvd);

But the above Script marked in Red is not working.

Anyone could you help me on this...

2 Replies
sushil353
Master II
Master II

Try this:

Concatenate

load *

from HistoricalData.qvd(qvd)

where Month_date=MonthEnd(Month_date);

somenathroy
Creator III
Creator III

Hi,

I think your approach should be as follow:

MaxDate:

Load Date(Max(Month_date),'DD/MM/YYYY') as MxDate Resident CurrentData;

LET vDate = FieldValue('MxDate', 1);

Drop Table MaxDate;

If $(vDate) = MonthEnd($(vDate)) then

     Concatenate(CurrentData)

     LOAD * from HistoricalData.qvd(qvd);

EndIf

Regards,

Som