Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
ranajit81
New Contributor III

Loading latest quarter field from qvd

Here is my code below. this code is at the data model level. i created the qvd using a QVD generator.

Currently the files in the qvd are for: December 2017 - 201712 and January 2018 - 201801

I want to load only the the latest data from the qvd - 201801 and not 201712

This is to be done in script as it will be binary loaded into another app

PMonthly stores  201712 and 201801 in text format

Performance:

LOAD Pven,

     PKey,

     PMea,

     PAct as Actual_Perf,

     PMonthly,

     Date(MakeDate(Left(PMonthly,4),Right(PMonthly,2),'01'),'MMM YYYY') as M_Perf_Month

FROM

$(vQvdPath)Manage_Perf.qvd(qvd);

Left Join(Performance)

load

    max(M_Perf_Month) as maxPerfmonth

resident Performance;

Let vVMO_Current_M_Perf_Date = peek('maxPerfmonth',0,'Performance');

Let vVMO_Latest_M_Perf_Date = num(monthname($(vVMO_Current_M_Perf_Date)));

1 Solution

Accepted Solutions

Re: Loading latest quarter field from qvd

Try this may be

Right Join(Performance)

load

    max(M_Perf_Month) as M_Perf_Month

resident Performance;

1 Reply

Re: Loading latest quarter field from qvd

Try this may be

Right Join(Performance)

load

    max(M_Perf_Month) as M_Perf_Month

resident Performance;