I have a table that has three columns, date (going back to 2017), product (same group of stock items ordered at different times) and price (price varies each time ordered).
I calculate the total stock issued each month and need a measure that looks up the last price, not the max price, based on a date selected by a slicer. The final aim being to have a report that I can quickly analyse year of stock data.
The measure I have MAXX('stockin','stockin'[unitprice]) sort of works but only gives the maximum price paid or if the item wasn't ordered that month(as selected on the slicer), no value (stock can be issued but not ordered for the month).
I tried to make some of the similar solutions work but can't seem to make them work for me.
Can anyone offer any solutions or ideas for this?
If your table is in the right order, then you can use either
FIRSTNONBLANK
orLASTNONBLANK
.And if your are looking for the last value even before the slicer range then: