Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
sunny_talwar

Try this may be

Right Join(Performance)

load

    max(M_Perf_Month) as M_Perf_Month

resident Performance;

View solution in original post

1 Reply
sunny_talwar

Try this may be

Right Join(Performance)

load

    max(M_Perf_Month) as M_Perf_Month

resident Performance;