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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
aronvermeulen
Contributor III
Contributor III

Max(date) in load script in where section

I want to make a table with only the latest 'Log date'.

a 'Document No' can contain multiple 'new status codes'.

But I want only to see the latest 'New Status Code'.

This is my script:

StatusLog1:

LOAD

[Document No_] as [Uitslag_No_],

[New Status Code],

[Log Date],

[Log Time]

FROM [lib://QVD (baslogistics_btb_qlik)/ProductieData\StatusLog1.qvd](qvd);

1 Solution

Accepted Solutions
neelamsaroha157
Specialist II
Specialist II

May be you can use

StatusLog1:

LOAD

[Document No_] as [Uitslag_No_],

[New Status Code],

[Log Date],

[Log Time]

FROM [lib://QVD (baslogistics_btb_qlik)/ProductieData\StatusLog1.qvd](qvd);

inner join

Load [Uitslag_No_], max([Log Date]) as [Log Date]

resident StatusLog1

group by [Uitslag_No_]

;

View solution in original post

1 Reply
neelamsaroha157
Specialist II
Specialist II

May be you can use

StatusLog1:

LOAD

[Document No_] as [Uitslag_No_],

[New Status Code],

[Log Date],

[Log Time]

FROM [lib://QVD (baslogistics_btb_qlik)/ProductieData\StatusLog1.qvd](qvd);

inner join

Load [Uitslag_No_], max([Log Date]) as [Log Date]

resident StatusLog1

group by [Uitslag_No_]

;