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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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 PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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