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: 
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 II
Partner - Master II

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!