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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
kkalyanrr
Helper V
Helper V

Customize Subtotal in a Table/Matrix chart

Hello Team,

 

I'm trying to customize the Subtotal in the Table/Matrix chart, please guide me through..

Below is the data, when I select Income and Other income Subtotal should display SUM of these two category values...
how ever If I select Expense along with Income then either subtotal should be masked or should be difference between
Income and Expense ..
the same follows with Income and Sales too.. 

kkalyanrr_0-1676017865868.png

 

1 REPLY 1
MAwwad
Solution Sage
Solution Sage

To customize the subtotal in a Table/Matrix chart in Power BI, you can create calculated columns to represent the desired subtotals and then use them in the chart. Here's an example of how you could approach this:

  1. Create a calculated column for the total income by using the following DAX formula:

Total Income = SUM(Table[Income] + Table[Other Income])

  1. Create a calculated column for the difference between Income and Expense by using the following DAX formula:

Income - Expense = SUM(Table[Income]) - SUM(Table[Expense])

  1. Create a calculated column for the difference between Income and Sales by using the following DAX formula:

Income - Sales = SUM(Table[Income]) - SUM(Table[Sales])

  1. In the Table/Matrix chart, add the Total Income, Income - Expense, and Income - Sales calculated columns, and use them in the subtotals based on your requirements.

Note that this is just one example of how you could customize the subtotals in a Table/Matrix chart in Power BI. You can also use different DAX formulas or pivot the data to get the desired subtotals.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.