Easy Tech Tuts
Power BI

How to Add Calculated Rows to Matrix in Power BI (Custom Totals Trick) Easily 2026

By Impran M N

Standard matrix totals don't always match what a business actually needs to see, especially when you want a custom calculation like a weighted average or a specific comparison row. This guide covers how to add calculated rows to a matrix in Power BI so you can build those custom totals. It's aimed at analysts who need more flexibility than the default subtotal settings provide.

01Understand calculated rows in context

Before building anything, get clear on which custom total or comparison you actually need, since the right DAX approach depends on that goal.

02Build the underlying measures

Write DAX measures that calculate the specific totals or custom rows you want, rather than relying solely on Power BI's automatic subtotal behavior.

03Add the calculated rows to your matrix

Bring the new measures into the matrix visual alongside your existing fields so the custom totals display in the right place within the report.

04Handle common pitfalls

Watch for issues like double-counting or incorrect context when combining calculated rows with existing totals, and test the numbers against a manual check.

05Apply best practices for reporting

Label calculated rows clearly so viewers can tell them apart from standard totals, avoiding confusion about how a number was derived.

FAQ

Frequently asked questions

Can I add a custom total that isn't just a sum, like an average or a ratio?

Yes, since calculated rows are built with DAX measures, you can define virtually any calculation, including averages, ratios, or weighted totals.

Why does my calculated row show the wrong number compared to a manual check?

This is usually a filter context issue, where the DAX measure isn't accounting for the same rows or filters you expected it to include.

Is this technique difficult for someone new to DAX?

It requires some comfort with writing measures, so it helps to start with a simple custom total before attempting more complex calculated rows.

Can calculated rows be formatted differently from regular data rows?

Yes, conditional formatting can be applied to make custom total rows stand out visually, such as bolding them or giving them a distinct background color.

Watch the full walkthrough

The same steps, demonstrated on screen from start to finish.