Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to display product with one price which is the newest one with the earliest date

Hi Guys,

I have a table like the following

VendorProductNet PriceValid From
AProduct 1

110

9/10/2017
AProduct 111024/6/2017
AProduct 111012/4/2017
AProduct 110416/12/2016
AProduct 110421/4/2016
BProduct 110510/10/2017
BProduct 11058/9/2017
AProduct 21037/7/2017
AProduct 21017/6/2017
BProduct 21025/6/2017
BProduct 21023/2/2017

Now what i want is to find the latest price of Product by Vendor but with the earliest Date.

VendorProductNet PriceValid From
AProduct 111012/4/2017
BProduct 11058/9/2017
AProduct 21037/7/2017
BProduct 21023/2/2017

I used firstsortedvalue to get the latest price.

My expression is FirstSortedValue([Net price],-[Valid From])

It gives the correct latest net price, but i could not able to Get earliest Date.


Any Ideas ?


Thank you so much in advance.

2 Replies
antoniotiman
Master III
Master III

May be this

Anonymous
Not applicable
Author

Max[Valid From] will give the maximum date but i want the earliest date in which there is max. price