Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
pachi12
Contributor II
Contributor II

How to keep the latest value?

Hi all,

I would need help from you.

In the below example, I would need to only keep the latest updated value (New Value = 2022-05-31T00:00:00.000Z) for the concerned Case number (1319).

To be noted that in my file I have >50000 different Case number.

pachi12_0-1662394563448.png

I tried to find help on this forum however I am a bit lost (as not being an expert in this domain).

Thanks in advance for your help!

Pachi12

 

Labels (1)
3 Replies
BrunPierre
Partner - Master
Partner - Master

Try this one at UI
 
=MAX(AGGR(Count( DISTINCT CaseNumber ),UpdatedDate))
 
or
 
at the backend with this
Data:
LOAD *
Inline [
CaseNumber,Field_Details,NewValue,UpdatedDate
1319,Receiptdate,2005-02-20T00:00:00.000Z,06:03:2022 13:23:15
1319,Receiptdate,2022-05-31T00:00:00.000Z,06:08:2022 05:05:52
];

NoConcatenate
LOAD CaseNumber,
Maxstring(Field_Details) as Field_Details,
Max(NewValue) as NewValue,
LastValue(UpdatedDate) as UpdatedDate

Resident Data
Group By CaseNumber
Order By CaseNumber;
DROP Table Data;
pachi12
Contributor II
Contributor II
Author

Thanks a lot for your help!