Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table of data that appears as such:
priceSTRUCTUREID Price PriceCODE Date (mm/dd/yyyy)
1234 55 a 2/1/2019
1234 60 a 2/15/2019
1234 40 a 2/20/2019
I want to build an expression that would generate the result for 'Price' based on the most recent date, which in this case would be 40
May be this
FirstSortedValue(Price, -Date)
This expression will be placed in a table. The Dimension is 'PRICECODE'
When I enter your expression, no output is generated
With the sample data you have provided, I don't see why the expression I have provided won't work. I am sure something else which you might not have shared in the sample data might be causing this. Can you share a better sample data?
STRUCTUREID PRICE DATE CODE
11065 85 12/29/2015 100PRF
11069 100 01/14/2019 CLUB
11069 20 01/14/2019 300LV3
11069 55 12/20/2018 100LV3
11064 60 12/31/2018 100LV4
11072 20 01/02/2019 300LV5
11059 25 11/03/2108 300LV3
PRICESTRUCTUREID PRICE DATE CODE
11065 85 12/29/2018 100PRF
11069 100 01/14/2019 CLUB
11069 20 12/20/2018 300LV3
11069 55 12/31/2018 100LV3
11064 60 01/02/2019 100LV4
11072 20 11/03/2018 300LV5
11059 25 01/02/2019 300LV3
I attempted to respond with more data, but it was marked as spam
Post it as an Excel file
So, Code is the dimension here and you would want something like this
Code Price
100LV3 60
300LV2 75
100LV2 155
CLUB 80
100PRF 90
My expression still holds
FirstSortedValue(Price, -Date)