Forum Discussion

michalintive's avatar
michalintive
Regular Visitor
9 years ago
Solved

Power BI subtracting

Hi all,

 

I need to create a new column with resoult of subsctracting two columns in Matrix view. I've tried to do it by guides in this community but I wasnt able to do it.

 

I need to do calculation:

A Revenue - B Project Costs = x

 

Next I need to:

X / A Revenue = ....

 

Do you have any ideas how to do that?

 

Much thanks for your help.

  • Create a measure like this:

     

    MeasureX = SUM([A Revenue]) - SUM([B Project Costs])

    and then:

     

    MeasureY = [MeasureX] / SUM([A Revenue])

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Create a measure like this:

     

    MeasureX = SUM([A Revenue]) - SUM([B Project Costs])

    and then:

     

    MeasureY = [MeasureX] / SUM([A Revenue])
  • v-sihou-msft's avatar
    v-sihou-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    michalintive 

     

    It depends. If those two columns are different data fields, you can just do as Greg_Deckler suggested. If your two columns in matrix are from same field under different Column group, you have to manually filter "Revenue" and "Project Costs" context. 

     

    Please share the screenshots of your matrix and sample data.

     

    Regards,