Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Tan_LC
Helper II
Helper 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.

 

Tan_LC_1-1706789404129.png

 

 

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

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

ThxAlot_0-1706805385851.png

 

for fun only, a showcase of powerful Excel formulas,

ThxAlot_1-1706806362600.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

1 REPLY 1
ThxAlot
Super User
Super User

ThxAlot_0-1706805385851.png

 

for fun only, a showcase of powerful Excel formulas,

ThxAlot_1-1706806362600.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.