Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max "Customer Order Date" and it's previous Record

Hi Community,

I'm trying to work out the previous Max Order Date (by customer).

I would like to obtain 2 informations:

1) the last Customer Order Date  >>>>> OK  [expression:  Max (ORDER_DATE)      or       aggr(max(ORDER_DATE),Customer)]

2)the previous last Customer Order Date >>>>>> PROBLEMS

---------------------------------------------------------------------------------------------------------------------------------------------------------

This is my GOAL:

Customer Max(ORDER_DATE)PREVIOUS max(ORDER_DATE)
Tom11/04/201408/04/2014
Mark15/04/2014

13/01/2014

This is my original table:



ORIGINAL TABLE
Customer ORDER_DATE  Order_Quantity
tom06/04/2014
tom07/04/2014
tom08/04/20145
tom09/04/2014
tom10/04/2014
tom11/04/20144
tom12/04/2014
tom13/04/2014
tom14/04/2014
tom15/04/2014
tom16/04/2014
Mark06/04/2014
Mark07/04/20142
Mark08/04/2014
Mark09/04/2014
Mark10/04/2014
Mark11/04/20143
Mark12/04/2014
Mark13/04/20143
Mark14/04/2014
Mark15/04/20144
Mark16/04/2014

Thanks

Markus

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Max(ORDER_DATE,2)

or

Aggr(Max(ORDER_DATE,2),Customer)

View solution in original post

3 Replies
MK_QSL
MVP
MVP

Max(ORDER_DATE,2)

or

Aggr(Max(ORDER_DATE,2),Customer)

rajat2392
Partner - Creator III
Partner - Creator III

check the attached app...

Not applicable
Author

Great Guys!!!

Thanks  all, i really appreciate...

Have a nice day