Forum Discussion
Calculation is not producing the correct figure
- 1 year ago
Just ignore this. I think I've figured out why.
CALCULATE ( SUM ( 'consolidated'[value] ), 'Consolidated'[Financial] = "Commitment" )This part of the formula
'Consolidated'[Financial] = "Commitment"is internally translated to
FILTER(ALL(Consolidated[Financial]), Consolidated[Financial] = "Commitment")which filters all rows where Financial is "Commitment" and applies this filter across the entire Consolidated[Financial] column. Therefore, unless the filter originates from a different column, the result remains consistent regardless of the value selected in Consolidated[Financial].
Change it to
CALCULATE ( SUM ( 'consolidated'[value] ), KEEPFILTERS ( 'Consolidated'[Financial] = "Commitment" ) )
Just ignore this. I think I've figured out why.
CALCULATE (
SUM ( 'consolidated'[value] ),
'Consolidated'[Financial] = "Commitment"
)
This part of the formula
'Consolidated'[Financial] = "Commitment"
is internally translated to
FILTER(ALL(Consolidated[Financial]), Consolidated[Financial] = "Commitment")
which filters all rows where Financial is "Commitment" and applies this filter across the entire Consolidated[Financial] column. Therefore, unless the filter originates from a different column, the result remains consistent regardless of the value selected in Consolidated[Financial].
Change it to
CALCULATE (
SUM ( 'consolidated'[value] ),
KEEPFILTERS ( 'Consolidated'[Financial] = "Commitment" )
)
That has worked! 😄 Thank you so much for your help in such a quick turnaround too!