Skip to main content
Microsoft Idea

Power BI

Under Review

Matrix/Table grand totals with Measures

Vote (1669) Share
's profile image

on 16 Jul 2018 15:59:57

It would be great if Grand Totals on a Matrix or Table would add up correctly to the sum of the rows when you include MEASURES in the visual. Currently the total on a measure consists of the measure function itself, instead of the sum of the rows above. PLEASE give us the option to toggle totals to be a simple aggregate of the rows above also.

Jeroen ter Heerdt (administrator) on 24 Oct 2022 18:59:09

Moving this idea to "under review" to mark that discussions are underway. For full transparency, we have started working on DAX calculations at the visual level. That feature will make changes that will serve as building blocks for other features, including but not limited to the one discussed in this idea: providing more flexibility for influencing what is shown on the total: the visual total, the "DAX" total, or another expression altogether.

Hence, the delivery of this Idea will be dependent on the DAX-calculations-on-a-visual feature.

Comments (136)
's profile image Profile Picture

on 11 Apr 2023 17:44:13

RE: Matrix/Table grand totals with Measures

Currently in the Table Visualization, users are only able to turn Totals on or off and only changing the font/color and outline. It would be very useful to have more options in here similar to the Matrix Visualization and more. Some I would love to have are:

- Alignment – Same as you have it for Field Formatting where each field gets its own option to choose how they want the total to display.

- Different types of total options – Right now I have to write a DAX query to get a different total calculation than the default ‘Sum’ that it does. This is not intuitive and I think more options here would make a huge difference. For instance, have the ability to choose Average, Percent to Total, Mode, etc.. Here is an example of what I need to do in order to achieve a custom percent to total of a column:

Total formatting different =
if(
HASONEVALUE(MyTableName[ColumnX]),
SUM(MyTableName[ColumnNeedsDifferentTotal]),
format(sum(MyTableName[ColumnNeedsDifferentTotal])/COUNT(MyTableName [ColumnNeedsDifferentTotal]),"Percent"))


- Ability to apply conditional formatting to totals

's profile image Profile Picture

on 11 Apr 2023 17:43:48

RE: Matrix/Table grand totals with Measures

Allow a user to sub-total in a table visualization based on a column he/she identifies in addition to the combined total values

's profile image Profile Picture

on 11 Apr 2023 17:43:48

RE: Matrix/Table grand totals with Measures

In a table or matrix viz, we have the option currently to turn all totals or subtotals on or off. We should be able to toggle totals and subtotals for each column or row header field individually.

Perhaps there is a limit like the header field must have less than X values, that would be fine.

This is needed because sometimes measures make sense in a particular context but not in aggregate, and i want to see those next to measures that make sense in a context and in aggregate.

One example of this is sales by month and cumulative sales growth against last year. The first makes sense both in context and aggregate. The second does not (or is not intuitive).

's profile image Profile Picture

on 11 Apr 2023 17:43:47

RE: Matrix/Table grand totals with Measures

I have had a continuous problem with totals not summing my columns. I've seen different solutions online, but they all involve coding that is not applicable to my model (calculating attribution based on allocation and returns through measures). The easy option would be to add an option on how totals work. Either you can choose to apply the formula as of now, or you could choose to Sum the values in the table. There could also be other simple additions such as Average, Min, Max, etc.

's profile image Profile Picture

on 11 Apr 2023 17:43:47

RE: Matrix/Table grand totals with Measures

The ability to add accumulating sub totals into a matrix table in Power BI. So for example Income, cost of sales and then a subtotal called gross profit, then overheads and another subtotal called net profit. The net profit would be a calculation of gross profit + overheads and not just total the overheads

's profile image Profile Picture

on 11 Apr 2023 17:43:34

RE: Matrix/Table grand totals with Measures

measure in table matrix calculates correctly at the row level, but not as expected at the total level (treats the total level as a row). Instead of having to rewrite the measure, the user should have the option to allow the total to calculate at the row level, or calculate as the sum of the values in the measure column, or as defined otherwise by the user.

's profile image Profile Picture

on 11 Apr 2023 17:43:33

RE: Matrix/Table grand totals with Measures

In a matrix we sometimes add a currency value and the converted sterling equivalent.  The total for the sterling equivalent is needed - but then the total on the currency value is a nonsense number.  In field formatting we mess around to hide that total using colours but really it should be an option to "do not total".  

It is not really a formatting issue but there is no per-field options within the subtotals section - so maybe it could sit in field formatting?

's profile image Profile Picture

on 11 Apr 2023 17:43:24

RE: Matrix/Table grand totals with Measures

Getting the right "total" on a matrix/table visual remains something that confuses many (e.g., many questions in the community). It would be great to have the option to choose how the "total" is calculated. The user should be able to choose the current behavior (i.e., no row filters) but also one of several aggregation options (sum, average, min, max). This would make it so new users wouldn't have to build and/or understand measure like - SUMX(VALUES(Table[Column]), [Measure]) for example.

's profile image Profile Picture

on 11 Apr 2023 17:43:23

RE: Matrix/Table grand totals with Measures

Please, it is not fun to explain to executives, why column grand totals are not the sum of the row data in the column. It is not fun, to explain the grand total, is the formula in the context of the entire range of data and not the sum of what is being displayed.

Please, allow us to change the context of the grand total to simply be a sum of the data shown in a matrix column.

Instead we are forced to write formulas that specifically geared to accommodate grand total to sum the data. It would be so much easier to click the format of grand total to simply sum a matrix column. It would be even better to select behavior per column.

's profile image Profile Picture

on 11 Apr 2023 17:38:56

RE: Matrix/Table grand totals with Measures

Grand totals currently return the measure at a Total level. So sometimes the value is incorrect as it is not an aggregate of the values in the table. PowerBI should at least give the option to calculate the Sum, Average, Weighted Average or Measure Calculation for the Grand Total.

Merged Idea (29)