Forum Discussion
Stock On Hand
Hello , im trying to archieve the following measure :
i need to calculate the actual stock in every month , starting from a inicial stock adding the customers buy and substracting the customer sales :
i have the folowing tables :
sell in : are the products wich each reseller buy to my company
sell out : are the sales from each reseller to final customer
inicial stock : the inicial stock in every product in every customer
I can also attach a pbix with this example
what i need to do is :
date customer sku Sell in Sell Out Stock
2020-02 | Customer1 | PROD001 | 0 | 273 | (previous month stock +sell in - sell out)
3 Replies
- amitchandak
Super User
Anonymous , You have use Intial stock + Cumalative Sell in - Cumalative Sell out
Qunatity on hand = [Intial stock] + CALCULATE([Sell in],filter(allselected(Date),Date[Date] <=max(Date[Date]))) -CALCULATE([Sell out],filter(allselected(Date),Date[Date] <=max(Date[Date])))
- AnonymousNot applicable
This was Great!! very helpfull , just for one detail :
If in the moth i have no sell in , the cumulative sum repeats the last acumulated value instead of sum 0
I created the tu cumulative measures , as you can see in the picture :
thanks amitchandak
- AnonymousNot applicable
Hello , amit , can you check te answer i posted using your solution ??