Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Reducing Time Table Data

Hello,

I got a main Table (Fact_Sales) wich is linked via the field [Key Time] to my time dimension table (Time). Both tables are build out of different qvd-files. I am reducing the data of the main Table while loding it's qvd file. Now I want to reduce the time Table to only hold the [Key Time] up to the max([Key Time]) from a group by [Another Field of the Main Table].

Till now I didn't get it going ;-((.

Anyone there that knows how to code it?

I tried:Fact_Sales2:

Load *,

    max([Key Time]) as [Max Time]

Resident Fact_Sales

group by [Sales Div Level 1];

Time:

LOAD Year,

...

FROM

$(QVDPath)Time.qvd (qvd)

where Year >= $(vYearStart)

and Time.[Key Time] <= [Max Time];

But that dosn't work

1 Reply

Re: Reducing Time Table Data

Try this.

Fact_Sales2:

Load *,

    max([Key Time]) as [Max Time]

Resident Fact_Sales

group by [Sales Div Level 1];

vMax = peek('Max Time',0,'Fact_Sales2');

Time:

LOAD Year,

...

FROM

$(QVDPath)Time.qvd (qvd)

where Year >= $(vYearStart)

and Time.[Key Time] <= $(vMax);

Regards,

Kaushik Solanki