I have the following sample data.
Date Category Price Quantity
02-01-2019 BASE_Y-20 279 1
02-01-2019 BASE_Y-21 271.25 0
03-01-2019 BASE_Y-20 276.5 2
03-01-2019 BASE_Y-21 266.5 0
04-01-2019 BASE_Y-20 272.88 14
04-01-2019 BASE_Y-21 266.5 1
07-01-2019 BASE_Y-20 270.48 29
07-01-2019 BASE_Y-21 262.75 0
08-01-2019 BASE_Y-20 270 4
08-01-2019 BASE_Y-21 264 0
09-01-2019 BASE_Y-20 270.06 31
09-01-2019 BASE_Y-21 262.85 0
What dynamic formula can I use to retrieve the most recent 5 prices for category BASE Y-20? The difficult element is that, if 5 values are missing, the formula must return any prices that are available. (For example, The values 270.06, 270, 270.48, 272.88, and 276.5 must be returned for the given data. If we only had the first row, it would have to return 279)
I used some products. Naturally, that provides the corresponding prices. To obtain the last 5 data, offset is available. But there is no way to see the most recent dynamically updated prices for the top 5 categories.