Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How to pick most recent record


Hi

I have a scenario where an order can have multiple certificates, but in the result set I wish to see most recent cert corresponding to the order based on start_date. Please see data below for 2 orders, I should be able to pick the highlighted data.

Order_IDCERT_IDStart_date
1234556709/01/2013
1234556809/02/2013
1234556909/03/2013
5678967809/07/2013
5678967509/07/2013

Please help. Thank you Much in advance

2 Replies
MVP
MVP

Re: How to pick most recent record

Create a chart with dimension Order_ID and as expression

=FirstSortedValue( CERT_ID, -Start_date)

where start date must have a numeric representation (i.e. like a QV date as a dual value).

Re: How to pick most recent record

Hi

Try with FirstSortedValue()

FirstSortedValue( CERT_ID, -Start_date)

Community Browser