Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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
Honored Contributor II

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

Try this:

Concatenate

load *

from HistoricalData.qvd(qvd)

where Month_date=MonthEnd(Month_date);

somenathroy
Contributor III

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

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

Community Browser