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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Select Last Record

Dear all

I need some help. I need a function which will give me the last record of many different groups.

For example : For the same project I have made 5 actions. I need to take the last ( by date action ) for another project I have made 10 actions I also want to take the last action.

I try to use Last or Max or FirstSortedValue or Top functions but the result isn't ok.

Each project has a unic code.

I looking forward for your help

Thank you very much

Kostas

Labels (1)
4 Replies
Not applicable
Author

Hi Kostas,

here are a short script example!

Good luck!

Rainer

Not applicable
Author

Kostas,

and here an example by expression.

It´s in german. Read the expression and see how it works.

Good luck!

Rainer

Not applicable
Author

Thank you very much for your instant responce.

The problem looks like this example.

Opportunity_ID Number_Of_Actions Last_Action_Date Last_Action_Description

001 5 20/11/2009 Meeting with the customer

002 1 23/11/2009 Call customer

For the 001 I have done 5 Actions in different dates. I need to take the last date ( I have no problem with this. I used the MAX function ) and the Last action ( too difficult for me ). If there is only one action it is ok.

Thank you again

Kostas

Not applicable
Author

Hi Kostas,

sorry for the delay!

Here are an example reflecting your data.

Have a nice weekend.

Rainer