Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
thanhphongle
Creator II
Creator II

Returning to every Category the last cost of every product

Hello Community is it possible to return to every category the last cost of a product? Here is my table

CategoryProductPurchasedateCost
CarMercedes A Class01.01.201530000
CarMercedes B Class01.01.201540000
CarMercedes B Class01.06.201535000
CarMercedes A Class01.06.201525000
ITAsus Laptop X101.01.20151000
ITApple Mac Pro01.01.20152000
ITAsus Laptop X101.06.2015800
ITApple Mac Pro01.06.20151800

It should return:

Car --> Mercedes A Class ---> Latest Purchasedate = 01.06.2015 ---> 25000

Car --> Mercedes B Class ---> Latest Purchasedate = 01.06.2015 ---> 35000

IT ---> Asus Laptop X1 --->Latest Purchasedate = 01.06.2015 ----> 800

IT ---> Apple Mac Pro ----> Latest Purchasedate = 01.01.2015 ---> 1800

1 Solution

Accepted Solutions
marcus_sommer

Try it with: firstsortedvalue(Cost, -Purchasedate)

- Marcus

View solution in original post

8 Replies
marcus_sommer

Try it with: firstsortedvalue(Cost, -Purchasedate)

- Marcus

sunny_talwar

In the script you want to load those rows of data or do you want a front end chart that shows the above rows?

FrontEnd Solution:

Capture.PNG

thanhphongle
Creator II
Creator II
Author

Thank you for replying. I ve tried your solutions. In fact I have a big database. For some values your solution is working but there are a lot of other values staying empty. Do I have to consider anything else? Unfortunetally I cant upload my database.

sunny_talwar

May be try it with FirstSortedValue(DISTINCT Cost, -Purchasedate)

thanhphongle
Creator II
Creator II
Author

Oh now its owrking thanks !

sunny_talwar

Without DISTINCT it is working now?

thanhphongle
Creator II
Creator II
Author

yes without

sunny_talwar

Great, as long as you are able to meet your requirement