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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
HxH
Advocate II
Advocate II

Cumulative backlog calculation

Hi everyone, 
I'm trying to create a measure that computes the cumulative difference of OPENED PRODUCTS vs CLOSED PRODUCTS and then split it by month to see how the team is doing. I am using the standard cumulative total pattern to perform such operations but it won't work. This is the measure: 

Backlog =
var ClosedContracts = CALCULATE(COUNT('FactTable'[Close Date]),USERELATIONSHIP('Date'[Date],'FactTable'[Close Date]))

var ProductsDelivered = CALCULATE(COUNT('FactTable'[Delivery Date]),USERELATIONSHIP('Date'[Date],'Salesforce Data'[Delivery Date]))
 
var Differential = ClosedContracts - ProductsDelivered
 
var Cumulative = FILTER(ALL('Date'),'Date'[Date]<=MAX('Date'[Date]))
 
var Backlog = CALCULATE(
Differential,
Cumulative)
 
return
Backlog

The measure should computer this, to be clear: 
-In January I close 5 contracts and deliver 3 products. Differential is 2 and backlog is 2.
-In February I close 5 contracts and deliver 0 produtcs. Differential is 5 and backlog is 7, as it should sum the backlog of the past month. 
And so on. 

The problem is that what it is computing instead is the difference between closed contracts and delivered products IN EVERY MONTH. So, in the previous example, backlog of february is 5 instead of 7 because it doesn't add the 2 from january. 

Could the problem be related to relationship between tables or something? Because the pattern in DAX is pretty common and I've used many times. I don't see what I'm missing.
Thanks for any help 



1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @HxH ,

 

You may add SUMX function in your formula like DAX below.

 

Backlog =
var ClosedContracts = CALCULATE(COUNT('FactTable'[Close Date]),USERELATIONSHIP('Date'[Date],'FactTable'[Close Date]))
 
var ProductsDelivered = CALCULATE(COUNT('FactTable'[Delivery Date]),USERELATIONSHIP('Date'[Date],'Salesforce Data'[Delivery Date]))
 
var Differential = ClosedContracts - ProductsDelivered
 
var Cumulative = FILTER(ALL('Date'),'Date'[Date]<=MAX('Date'[Date]))
 
var Backlog = CALCULATE(
SUMX('Date', Differential),
Cumulative)
 
return
Backlog

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

1 REPLY 1
v-xicai
Community Support
Community Support

Hi @HxH ,

 

You may add SUMX function in your formula like DAX below.

 

Backlog =
var ClosedContracts = CALCULATE(COUNT('FactTable'[Close Date]),USERELATIONSHIP('Date'[Date],'FactTable'[Close Date]))
 
var ProductsDelivered = CALCULATE(COUNT('FactTable'[Delivery Date]),USERELATIONSHIP('Date'[Date],'Salesforce Data'[Delivery Date]))
 
var Differential = ClosedContracts - ProductsDelivered
 
var Cumulative = FILTER(ALL('Date'),'Date'[Date]<=MAX('Date'[Date]))
 
var Backlog = CALCULATE(
SUMX('Date', Differential),
Cumulative)
 
return
Backlog

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.