Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 1st, 2nd, and 3rd and the stock is 10 shirts per day and total stock is 30 now
and on 4th 15 shirts sold
desired result: the sold count in Branch 1 should deduct fromn first in date in branch 1(the count sold is 15 on 4th so 10 should be decuted from 1st date and 5 shoud be deducted on 2nd)
and in the same way when 7 shirts sold on 5th date then 5 deducted from 2nd date (remaining in 2nd date) and 2 should deduct from 3rd date
Note: Calculation should be done based on Branch
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.
Example:
Date | Branch | New Stock | Stock out | Result |
01-01-2022 | Branch 1 | 10 |
| 0 |
02-01-2022 | Branch 1 | 10 |
| 0 |
03-01-2022 | Branch 1 | 10 |
| 8 |
04-01-2022 | Branch 1 |
| 15 |
|
05-01-2022 | Branch 1 |
| 7 |
|
06-01-2022 | Branch 2 | 10 |
| 0 |
07-01-2022 | Branch 2 | 10 |
| 5 |
08-01-2022 | Branch 2 | 10 |
| 10 |
09-01-2022 | Branch 2 |
| 15 |
|
10-01-2022 | Branch 3 | 10 |
| 0 |
11-01-2022 | Branch 3 |
| 10 |
|
Solved! Go to Solution.
This question is already answered in:
https://community.powerbi.com/t5/Desktop/Inventory-aging-report/m-p/2493851#M887356
This question is already answered in:
https://community.powerbi.com/t5/Desktop/Inventory-aging-report/m-p/2493851#M887356
User | Count |
---|---|
25 | |
11 | |
8 | |
7 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
10 | |
6 |