Forum Discussion

fxz9's avatar
fxz9
Frequent Visitor
8 years ago
Solved

table Calculate for sum field operation

Source Data Example   item amount AA 10 AA 5 BB 3 BB 3   after powerBI by summrize by item (categray)  item       Sum AA 15 BB 6     I hope power bi can s...
  • v-yulgu-msft's avatar
    8 years ago

    Hi fxz9,

     

    Power BI doesn't support that. As a workaround, you can show the difference in an extra column. Please refer to below measure:

    AA-BB =
    CALCULATE (
        SUM ( Table1[amount] ),
        FILTER ( ALL ( Table1 ), Table1[item] = "AA" )
    )
        - CALCULATE (
            SUM ( Table1[amount] ),
            FILTER ( ALL ( Table1 ), Table1[item] = "BB" )
        )

     

    Best regards,

    Yuliana Gu