Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
richard_chilvers
Contributor III

Loading just the max record in each group

Hi

This seems a simple issue, but I cannot find the solution on here !

My table has the following fields per record:

Index, date, field1, field2

For each value of Index, I want to load just the record with MAX(date).

I believe   LOAD Index, MAX(date) from table group by Index    would work.

But how do I include field1 and field2 ?

Thanks.

Tags (3)
1 Reply

Re: Loading just the max record in each group

Left join it with the load of all fields:

load Index, max(date) as date from table group by Index;

left join load Index, date, field1, field2 from table;


talk is cheap, supply exceeds demand
Community Browser