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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
j_w
Helper IV
Helper IV

How to add subtotal in table visual

In Power BI report, I have the table visual below, which includes invoice line item level data:

j_w_0-1755038319316.png

 

The user wants to view the data grouped by customer, with a subtotal row for each customer in the style shown below. The rows should dynamically change according to filters such as Invoice Date range and/or Item filter. Is this something that can be done in Power BI?

j_w_1-1755038387879.png


Thanks

1 ACCEPTED SOLUTION
MasonMA
Memorable Member
Memorable Member

Hello @j_w 

 

Yes, this can be done through Matrix visual. When you set up your visual, drag your fields 'Customer', 'InvoiceNo.', 'Item', 'Price' and 'InvoiceDate' to 'Rows', your Measures  'Qty', and 'Amount' to Values.

MasonMA_0-1755042248151.pngMasonMA_4-1755042465643.png

 

MasonMA_1-1755042274157.pngWhen you 'Format your Visual' for Matrix, have your 'Row Subtotal' turned on but only leave 'Show Subtotal' On for 'Customer' and 'InvoiceNo.'. You can rename 'Subtotal label' for 'InvoiceNo.' to 'Subtotal'. as in below picture. 

 

(For the Matrix layout and Style, i used 'Minimal' for Style and 'Tabular' for Layout. )

MasonMA_2-1755042383714.png

 

 

Then you can use your date table to filter your Matrix visual.

MasonMA_3-1755042410080.png

 

Hope this helps:) 

 

 

View solution in original post

6 REPLIES 6
j_w
Helper IV
Helper IV

@danextian thanks for the tips, it works! It's "repeat row headers".

j_w_0-1755054332403.png

 

j_w
Helper IV
Helper IV

Hi @MasonMA thank you for your help. It’s close to what the user wants in terms of style. I now have the result shown below, is it possible to repeat the column values in the area I marked with a red line? I thought this might make it easier for some users to read the data in the same row.

j_w_1-1755050202376.png

 

 

Change the matrix layout to Tabular and look for "repeat category labels" or something.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
j_w
Helper IV
Helper IV

Hi @MasonMA , thanks for your post. I’m not sure if the sample data and columns in my question were too simplified, the actual table visual has many more columns. After following your suggested steps using a matrix, my matrix now looks like the one below, which is hard for the user to read, any suggestion please?

j_w_1-1755043171142.png

 

Also, the Subtotal label setting doesn’t seem to be working. I set it to "Subtotal", but the matrix still shows "Sub":

j_w_2-1755043362181.pngj_w_3-1755043396624.png

Thanks

MasonMA
Memorable Member
Memorable Member

Hello @j_w 

 

In 'Row Subtotal' setting, you may need to Switch Off 'Show subtotal' for all items in 'Row level' dropdown except for 'Customer' and 'Report Group'. 

MasonMA_3-1755044713043.png

 

Same logic for Column Subtotal, you can adjust them here. 

MasonMA_2-1755044600130.png

 

Hope this works:)

 

MasonMA
Memorable Member
Memorable Member

Hello @j_w 

 

Yes, this can be done through Matrix visual. When you set up your visual, drag your fields 'Customer', 'InvoiceNo.', 'Item', 'Price' and 'InvoiceDate' to 'Rows', your Measures  'Qty', and 'Amount' to Values.

MasonMA_0-1755042248151.pngMasonMA_4-1755042465643.png

 

MasonMA_1-1755042274157.pngWhen you 'Format your Visual' for Matrix, have your 'Row Subtotal' turned on but only leave 'Show Subtotal' On for 'Customer' and 'InvoiceNo.'. You can rename 'Subtotal label' for 'InvoiceNo.' to 'Subtotal'. as in below picture. 

 

(For the Matrix layout and Style, i used 'Minimal' for Style and 'Tabular' for Layout. )

MasonMA_2-1755042383714.png

 

 

Then you can use your date table to filter your Matrix visual.

MasonMA_3-1755042410080.png

 

Hope this helps:) 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.