Forum Discussion
kkalyanrr
3 years agoHelper 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 th...
MAwwad
3 years agoSolution 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:
- Create a calculated column for the total income by using the following DAX formula:
Total Income = SUM(Table[Income] + Table[Other Income])
- 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])
- 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])
- 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.