Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!