Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
In below table, I would like to calculate ClosingStk based on ShiftDate and SizeNo.
The first ClosingStk for the same SizeNo should be using InitialStkCount (column G) + CuredQty (column D) - StkInQty (column C).
Subsequent and remaining ClosingQty for the same SizeNo should be using ClosingStk from previous row (column F) + CuredQty (column D) - StkInQty (column C).
Please help.
| ShiftDate | SizeNo | StkInQty | CuredQty | InitialStkCount | Closing Stk | |
| 1/1/2024 | A001 | 100 | 333 | 433 | ||
| 2/1/2024 | A001 | 864 | 964 | 433 | 533 | |
| 3/1/2024 | A001 | 160 | 263 | 533 | 636 | |
| 4/1/2024 | A001 | 636 | 636 | |||
| 5/1/2024 | A001 | 345 | 550 | 636 | 841 | |
| 2/1/2024 | B001 | 112 | 128 | 86 | 102 | |
| 3/1/2024 | B001 | 68 | 52 | 102 | 86 | |
| 4/1/2024 | B001 | 235 | 300 | 86 | 151 | |
| 5/1/2024 | B001 | 151 | 151 | |||
| 2/1/2024 | C001 | 280 | 336 | 268 | 324 | |
| 3/1/2024 | C001 | 112 | 126 | 324 | 338 | |
| 4/1/2024 | C001 | 135 | 250 | 338 | 453 | |
| 5/1/2024 | C001 | 325 | 400 | 453 | 528 |
Thank you.
Regards,
LC
Solved! Go to Solution.
for fun only, a showcase of powerful Excel formulas,
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |