Forum Discussion

SamfarUK's avatar
SamfarUK
Icon for Helper I rankHelper I
1 year ago
Solved

Calculation is not producing the correct figure

I have a column in the data spreadsheet that = £288k The transformed data in the PBI = £288k  The measure calculation in the card I have created = £300k     I do not understand how t...
  • danextian's avatar
    danextian
    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" )
    )