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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
GOLEARY735
Frequent Visitor

Calculate a cumulative total using 2 tables and different date granularity

Hi all. 

 

Been searching for an answer to this for hours! Hope someone can help. 

 

I have some data coming in from a database which tells me components that I have on order and their delivery dates (days). There can be multiple rows for the same components due in on different dates. Table is called POPOrderReturnLine

 

GOLEARY735_3-1738162469505.png

 

I have another table which shows me what I have in stock. Table is called StkBalance

GOLEARY735_4-1738162619198.png

 

I have other data coming in from an excel file which tells me which components are used on which BoMs (some are common across BoMs) and when they're planned to be consumed. This means I have multiple rows of the same component part consumed at different dates in different qntys throughout the year.

 

GOLEARY735_0-1738161804806.png

 

I've created a relationship between the date columns in both tables to a 'Calendar' date table that spits info back out at me in weeks, and I've created a 'Planned Consumption' sheet and a 'Planned Goods Receipt' sheet:

 

GOLEARY735_1-1738161973106.png

GOLEARY735_2-1738162019613.png

 

This is all good info but what I need to create is a table that will show me the week number that I'll run out of stock of each component. So I need to be able to calculate a cumulative total of each component for each week of 2025, if that value is a negative value, I know I either need to order more in before that date, or amend my production schedule. 

 

Appreciate you reading! Please let me know if I've missed any information off that you need to be able to help.  

 

Thanks. 

G

1 REPLY 1
Anonymous
Not applicable

Hi @GOLEARY735 

To better assist you, please provide sample data that fully covers your issue (in the form of table or pbix file) and the expected outcome based on the sample data you provided. Please remove any sensitive data in advance.


 

 

Best Regards,

Jayleny

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.