Forum Discussion
Inserting Subtotals in a Table
Hi Everyone, I would need to add subtotals to a table.
I have checked various sources and they all suggest to use a Matrix whereas what I'm looking for, and I'm not sure whether it is possible, is to add subtotal Total_Sales lines by Location without disrupting the table.
In other words one subtotal line for Location MAIN.C and another for Location ICENI.MAIN.
Any help will be very much appreciated. Screenshot contains demo data.
Use a Matrix but make it look like a Table
Put your detail fields (Customer, Document No., Line, Item, …) in the Matrix Rows
Put Total_Sales in Values
Put Location as the first row level (above the details)
Turn on Subtotals for Location
Then format it to look like a Table:
Row headers: Stepped layout = Off
Subtotals: On (only for Location)
Gridlines / outline: adjust to match your table style
I would add to the steps that cengizhanarslan suggestes to use the Outline or Tabular formatting in the matrix visual. This was the game changer for our team. This is under the format pane:
5 Replies
- cengizhanarslan
Super User
Use a Matrix but make it look like a Table
Put your detail fields (Customer, Document No., Line, Item, …) in the Matrix Rows
Put Total_Sales in Values
Put Location as the first row level (above the details)
Turn on Subtotals for Location
Then format it to look like a Table:
Row headers: Stepped layout = Off
Subtotals: On (only for Location)
Gridlines / outline: adjust to match your table style
- d_m_LNK
Super User
I would add to the steps that cengizhanarslan suggestes to use the Outline or Tabular formatting in the matrix visual. This was the game changer for our team. This is under the format pane:
- danextian
Super User
Hi Principiante
Think of a Power BI table visual the same way as an Excel table—you only get a single total row. As others have already pointed out, the closest alternative is to use a Matrix visual in tabular layout.
Just keep in mind that sorting in a matrix is hierarchy-aware. For example, if Customer is a higher-level field and Document No is beneath it, sorting the visual by Document No will only sort those values within each Customer, not across all customers globally or across the whole visual.
- v-hjannapu
Community Support
Hi Principiante,
I would also take a moment to thank cengizhanarslan , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Regards,
Community Support Team.- v-hjannapu
Community Support
Hi Principiante,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.
Regards,
Community Support Team.