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: 
Dataguy46
Contributor III
Contributor III

Max value/Latest value of a dimension wrt max date

Hi All,

I am trying the get a max value/ a latest value of a dimension with respect to its max date,

example data below

 

Dataguy46_0-1714468735834.png

 

Expected output:

Lead ID Process_date LeadQA Status Name
524987 4/26/2019 9:13:45 AM Delivered
Labels (1)
2 Solutions

Accepted Solutions
BrunPierre
Partner - Master
Partner - Master

In the script.

Data:
LOAD "Lead ID",
process_date,
"Lead QA Status Name",
...
FROM Source

Inner Join

LOAD Max(process_date) as process_date
Resident Data;

View solution in original post

BrunPierre
Partner - Master
Partner - Master

Grouping by Lead ID ensures that the Max(process_date) is aggregated for each Lead ID.

LOAD "Lead ID",
Max(process_date) as process_date
Resident Data
Group By "Lead ID";

View solution in original post

2 Replies
BrunPierre
Partner - Master
Partner - Master

In the script.

Data:
LOAD "Lead ID",
process_date,
"Lead QA Status Name",
...
FROM Source

Inner Join

LOAD Max(process_date) as process_date
Resident Data;

BrunPierre
Partner - Master
Partner - Master

Grouping by Lead ID ensures that the Max(process_date) is aggregated for each Lead ID.

LOAD "Lead ID",
Max(process_date) as process_date
Resident Data
Group By "Lead ID";