Forum Discussion

Tan_LC's avatar
Tan_LC
Helper II
2 years ago
Solved

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.

 

 

 

ShiftDateSizeNoStkInQtyCuredQtyInitialStkCount Closing
Stk
1/1/2024A001 100333 433
2/1/2024A001864964 433533
3/1/2024A001160263 533636
4/1/2024A001   636636
5/1/2024A001345550 636841
2/1/2024B00111212886 102
3/1/2024B0016852 10286
4/1/2024B001235300 86151
5/1/2024B001   151151
2/1/2024C001280336268 324
3/1/2024C001112126 324338
4/1/2024C001135250 338453
5/1/2024C001325400 453528

 

Thank you.

 

Regards,

LC