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

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

Reply
Antmkjr
Post Patron
Post Patron

Cumulative over cumulative performance

https://drive.google.com/file/d/1GznvuGASdWCxpaIl3MAjtnMoJmmj6HPB/view?usp=sharing

 

In the file attached, the formula for Cumulative Final To Collect Result is working fine, but in the actual model the performance is very bad. Any ways to improve ?

 

Cumulative Final To Collect Result =
CALCULATE( [Cumulative Final To Collect Prep],
FILTER( ALLSELECTED('Date'),
'Date'[Date] <= MAX( 'Date'[Date] )
)
)

 

Cumulative Final To Collect Prep =
VAR vTable =
ADDCOLUMNS(
SUMMARIZE( 'Date', 'Date'[Year], 'Date'[MonthName] ),
"@Total",
[Final To Collect]+[Total Project Collections]
)
RETURN

SUMX( vTable, [@Total] )
 
 
 

AnuTomy_0-1609329336352.png

 

2 REPLIES 2
PaulPalma
Frequent Visitor

@Antmkjr 

 

I recommend reviewing this resource: Cumulative total – DAX Patterns

 

Based on your example I believe the main performance issue is related to iterations. You are creating a variable table in your DAX expression to create a Date Table for iterations. I recommend to use the power of the relationships with the Data Table to drive your DAX computations.

 

Example "Cumulative Final To Collect Prep" can most likely reduced to 

 

Cumulative Final To Collect Prep =

[Final To Collect]+[Total Project Collections]

 

All the best,

 

Paul

lbendlin
Super User
Super User

What are the filters that influence the result of the computation? Could you get away with using a calculated column instead of a measure? At least for part of the formula?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.