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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.