Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
erieqlik
Contributor III
Contributor III

Getting first/most recent records

I have a list of project data. Multiple status records per project. I want a list of only the most recent records. I have already built the qvd of data from the data warehouse. I need to either do the data selection in the LOAD or in the dashboard. I am OK with either. I am not great with qlik load syntax and so far I have been unable to construct a sql query that would work. Nor have I been able to get FirstSortedValue to work properly.

Thanks for the help, JM

Labels (1)
2 Replies
Or
MVP
MVP

Load Project, Max(Date) as Date

From SomeTable;

Left Join

Load *

From SomeTable;

You could also handle this with a combination of Max() (for the date) and FirstSortedValue() (for the status and any other dimensions) but that would be clunkier, albeit potentially more efficient.

erieqlik
Contributor III
Contributor III
Author

So I get an error. This part of the query is already an inner join so perhaps this is a problem. However, I will keep trying.