Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community is it possible to return to every category the last cost of a product? Here is my table
Category | Product | Purchasedate | Cost |
---|---|---|---|
Car | Mercedes A Class | 01.01.2015 | 30000 |
Car | Mercedes B Class | 01.01.2015 | 40000 |
Car | Mercedes B Class | 01.06.2015 | 35000 |
Car | Mercedes A Class | 01.06.2015 | 25000 |
IT | Asus Laptop X1 | 01.01.2015 | 1000 |
IT | Apple Mac Pro | 01.01.2015 | 2000 |
IT | Asus Laptop X1 | 01.06.2015 | 800 |
IT | Apple Mac Pro | 01.06.2015 | 1800 |
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
Try it with: firstsortedvalue(Cost, -Purchasedate)
- Marcus
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:
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.
May be try it with FirstSortedValue(DISTINCT Cost, -Purchasedate)
Oh now its owrking thanks !
Without DISTINCT it is working now?
yes without
Great, as long as you are able to meet your requirement