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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
letqi
Contributor II
Contributor II

How to remove duplicated records and display only latest accessed record

Hi all, how to remove duplicated records and display only the last accessed record. i have inserted a diagram below as example reference. would like to do this in load editor.

 

current table, EmployeeTable:

id name  company last accessed date
1 anne dell 02-09-2022
1 anne dell 12-09-2022
1 anne dell  01-01-2011
2 belly hp 23-08-2022
2 belly hp 10-09-2022

 

output:

id name  company last accessed date
1 anne dell 12-09-2022
2 belly hp 10-09-2022
Labels (5)
2 Replies
letqi
Contributor II
Contributor II
Author

NoConcatenate

EmployeeTableLatest:

Load *, 

Max(Date(last_accessed_date, 'YYYY-MM-DD')) as maxLastAccessedDate;

Resident EmployeeTable

Group by name, maxLastAccessedDate;

 

error message: invalid max expression

Vegar
MVP
MVP

Your group by is wrong. You need to group by the dimensions that is not aggregated in your table  See suggestion  below.

EmployeeTableLatest:

Load id, name, company,

Max(Date(last_accessed_date, 'YYYY-MM-DD')) as maxLastAccessedDate;

Resident EmployeeTable

Group by id, name, company;