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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get the last value from FirstSortedValue function

Hi,

I want to get the last order Date for each customer using the FirstSortedValue function

For example

Name      OrderDate

miguel     21/01/2014

Jose       30/11/2014

Carlos     13/01/2014

Miguel     21/11/2014

the output data look like

Name     OrderDate

Miguel     21/11/2014

Jose       30/11/2014

Carlos     13/01/2014

Anyone can help me?

2 Replies
JonnyPoole
Former Employee
Former Employee

This should work in a chart expression:

FirstSortedValue( Date#(OrderDate,'DD/MM/YYYY'), Date#(OrderDate,'DD/MM/YYYY'))

Capture.PNG.png

Not applicable
Author

I just solved.

Only had to add symbol - to parameters and it works correctly.