I'm having some trouble putting together an SSRS report to show the historical layers for inventory items that make up the current on-hand quantity. I currently have a report that shows both the on-hand quantity and all of the layered transactions (sales and purchases) that make up that quantity, but going forward, I would like only to see the most recent layers associated that make up the current quantity. If we use the same item for the next 5 years, I don't want tosee 5 years worth of transactions if the last 7 transactions actually make up the current quantity. Not sure how to write that in SQL to translate to my report.
Anyone else done something like this?
*This post is locked for comments