Forum Discussion

ajrodr82's avatar
ajrodr82
Regular Visitor
3 years ago
Solved

Inventory Change from Beginning Value

Hello all, 

 

I'm having a difficult time calculating inventory change over time. I am trying to visualize a matrix where the earliest month I have data for will be my starting inventory value to then calculate additional units purchased minus billed. For whatever reason all it's doing is taking the beginning total, adding purchased then subtracting billed and giving that total by month. The expression is I'm needing is: Beginning Value + Purchased - Billed = EOM Inventory

 

For my model I have:

  1. Date table, marked as date
  2. Inventory table with the units and inventory date
  3. There is a relationship between these two tables

 

Here is what I'm expecting:



Here is my DAX:

CALCULATE(
	SUM('Inventory'[Units]),
	FILTER(
		ALLSELECTED('Inventory'[Date]),
		ISONORAFTER('Inventory'[Date], MAX('Inventory'[Date]), DESC)
	)
)



11 Replies