Forum Discussion
Cumulative Total Not Working Properly
- 6 years ago
Hi AltGr9
I think there must be another sort column in play (possibly on 'Dimension Month[YearMonth]).
Try the expression below, which will remove all filters from the 'Dimension Month' table apart from Month ID <= MaxMonthID:
Ordered Running Total = VAR MaxMonthID = MAX ( 'Dimension Month'[Month ID] ) VAR Result = CALCULATE ( SUM ( 'Fact Monthly Project Rollup'[Capital Expenditure] ), FILTER ( ALL ( 'Dimension Month' ), 'Dimension Month'[Month ID] <= MaxMonthID ), 'Dimension Capital Expenditure Type'[Capital Expenditure Type] = "Ordered" ) RETURN ResultBest regards,
Martyn
Thank you very much Martyn. The column was indeed sorted by another, and I added that to the ALL clause of both of the measures making up my Committed measure: [Ordered Running Total] and [Received Running Total].
Unfortunately, it didn't work. Same result as before.
Hi AltGr9
I think there must be another sort column in play (possibly on 'Dimension Month[YearMonth]).
Try the expression below, which will remove all filters from the 'Dimension Month' table apart from Month ID <= MaxMonthID:
Ordered Running Total =
VAR MaxMonthID = MAX ( 'Dimension Month'[Month ID] )
VAR Result =
CALCULATE (
SUM ( 'Fact Monthly Project Rollup'[Capital Expenditure] ),
FILTER (
ALL ( 'Dimension Month' ),
'Dimension Month'[Month ID] <= MaxMonthID
),
'Dimension Capital Expenditure Type'[Capital Expenditure Type] = "Ordered"
)
RETURN
Result
Best regards,
Martyn
- AltGr96 years agoHelper I
Greatly appreciated!