Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Bug when using Calculate with variables

Hey, everyone.   I'm having a problem with Calculate and Variables.   This is the data I generated for the Proof of Concept       I'm trying to obtain the sum of amount in each ca...
  • ChrisMendoza's avatar
    7 years ago

    Anonymous -

    I might have chosen a different method that you may find useful based off of what you've shown:

    Measure =
    IF (
        ISFILTERED ( Planiha1[Client] ),
        SUM ( Planiha1[Amount] ),
        CALCULATE (
            SUM ( Planiha1[Amount] ),
            ALLEXCEPT ( Planiha1, Planiha1[Category] )
        )
    )