Forum Discussion
Reddyp
4 years agoHelper I
Inventory aging report
I need to do this inventory calculation for individual branch (Example: if stock sold in branch 1 then the count of sold should deduct from Branch 1) Example: I have received stock to B ranch 1 on 1...
- 4 years ago
Hi Reddyp
Here is a sample file https://we.tl/t-fIVAYRKzHD
One way is as follows: New Column >Result = VAR NewStock = SUMX ( FILTER ( CALCULATETABLE ( Stock, ALLEXCEPT ( Stock, Stock[Branch] ) ), Stock[Date] <= EARLIER ( Stock[Date] ) ), Stock[New Stock] ) VAR StockOut = CALCULATE ( SUM ( Stock[Stock out] ), ALLEXCEPT ( Stock, Stock[Branch] ) ) VAR Difference = NewStock - StockOut RETURN IF ( NOT ISBLANK ( Stock[New Stock] ), IF ( Difference <= 0, 0, IF ( NewStock - Stock[New Stock] > StockOut, Stock[New Stock], Difference ) ) )
Reddyp
4 years agoHelper I
jsaunders_zero9 Thank you for the reply, Can you please helpme with the DAX code
I have already received response from Greg_Deckler for my previous question in calculating stock in and stock out for one branch (https://community.powerbi.com/t5/Desktop/Inventory-stock/td-p/2431824)
Request: But now I have different branches in my data and I need help in modifing DAX code provided by Greg_Deckler
Greg_Deckler @jsaunders_zero9
Ashish_Mathur tamerj1 If possible please help me out, this is little urgent for me to close my work.
jsaunders_zero9
4 years agoResponsive Resident
Hi Reddyp
My solution is in Power Query, I will leave you with the DAX experts seeing as you are halfway there.
Thank you