Forum Discussion

chahineatallah's avatar
chahineatallah
Helper III
5 years ago
Solved

calculate function

Hello, i have a question as i know calculate will over ride any filter in context, so why am getting blank values, why it is not showing same values everywhere, thanks  
  • v-alq-msft's avatar
    5 years ago

    Hi, chahineatallah 

     

    I'd like to suggest you use 'ALL(Table)' or 'ALLSELECTED(Table)' in 'Filter'. I created data to reproduce your scenario. The pbix file is attached in the end.

    Table:

     

    You may create a measure like below.

    Result = 
    CALCULATE(
        SUM('Table'[Value]),
        FILTER(
            ALLSELECTED('Table'),
            'Table'[Class]="c1"
        )
    )

     

    Result:

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.