Last Non Empty per date (Most Current Inventory)

datanerd

New Member
Joined
Feb 4, 2014
Messages
1
Here is a little context. I have product subcategory as row label. I have a daily snapshot of inventory and using count of inventory as the measure. The measure I want to be sure that I return the latest dated inventory when I don't specify a date as the column label. But if a date is specified then I want to be sure to show that dates inventory in which the cell relates. Inventory from day to day can go to 0. So not everyday a subcategory has inventory. I have tried using LastNonEmpty to return the last date. But what happens is one subcategory is from today and the next subcategory is from the previous day that did have inventory for that date. I have been able to create a measure that returns the max date for which the column pertains. Here is that formula. CALCULATE(MAX([Business Date]), ALLEXCEPT('Inventory', 'Date'))

What I cannot seem to figure out is how to put that into the filter context for the inventory count so I return inventory which only pertains to that date. Any and all help is appreciated!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,225,346
Messages
6,184,411
Members
453,230
Latest member
ProdInventory

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top