Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Cuda1337
New Member

How can I add/subtract/divide two columns in a matrix table?

I'm VERY new to PowerBI, so I apologize if I don't use the right terminology. 

I have a matrix table in my report. 

I am using a date slicer and an employee name slicer to show me two columns of values, that are pulled from two separate tables.  These tables have a mutual relationship with a date table and with a (I think it's called a fact table?) that has employee names. 

That all works perfect. 

The problem I have is that my two columns display employee cost, and employee revenue generated.  I want to add them together to get a profit/loss per employee. 

I cannot figure out how to add two columns on a filtered table to display a third column with the calculation applied. 

Any help is much appreciated!

1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

Hello,

 

you can create a new measure that would be

 

Profit / loss= sum(employee revenue) - sum(employee cost)

and then add it to your matrix

 

check this link to see how to make a measure https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tutorial-create-measures

 

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Idrissshatila
Super User
Super User

Hello,

 

you can create a new measure that would be

 

Profit / loss= sum(employee revenue) - sum(employee cost)

and then add it to your matrix

 

check this link to see how to make a measure https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-tutorial-create-measures

 

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




I've tried that, and it looks like this: 

Profit/Loss = SUM('Appointment Billing Info_202212'[Contract Amount] - SUM('Combined Payrolls'[Total employer cost]))
 
I'm getting an error, however, that says 'the sum function only accepts a column reference as an argument'.

Nevermind!  I had the parenthesis wrong.  I've fixed it, and it works now.  Thank you so much!

Great!

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.