Forum Discussion
Tan_LC
2 years agoHelper II
Calculated column for ClosingStk using DAX
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
for fun only, a showcase of powerful Excel formulas,
1 Reply
- ThxAlotSuper User