The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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)
@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])))
Hello , amit , can you check te answer i posted using your solution ??
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
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |