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

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

Reply
flunte70
Helper I
Helper I

Difference between 2 columns in a Matrix Table

I have a report with a matrix table with two columns that I want to show the difference between.

I cannot do this calculation in the Data table as it is the same column.

 

My data is in a table called "Data" and the fields are called "Type" and "Total".

'Data'[Type] contains several data series like "Actual", "Budget", etc. & 'Data'[Total] contains values.

 

I my matrix table in my report the column is 'Data'[Type] which is filtered into two columns "Actual" and "Budget" and Values is 'Data'[Total].

 

Now I want to make a third column called "Deviation" showing the difference between Actual and Budget.

 

Here is a screendump of my matrix:

 

diff.jpg

 

1 ACCEPTED SOLUTION

Thanks for your fast reply!

 

Someone advised me to change my matrix table to a normal table by filtering my dataset so now it's much easier to do the excercise.

 

But thanks anyway!

View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @flunte70,

 

Try something like this:

Deviation =
CALCULATE ( SUM ( Data[Total] ), Data[Type] = "Actual" )
    - CALCULATE ( SUM ( Data[Total] ), Data[Type] = "Budget" )

Should work.

 

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks for your fast reply!

 

Someone advised me to change my matrix table to a normal table by filtering my dataset so now it's much easier to do the excercise.

 

But thanks anyway!

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors