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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

How to get percentage of subtotal in a matrix ?

Hello everybody,

 

In power BI desktop I would like to get the porcentage of subotals for rows and lines. 

 

Here is my matrix : 

Benjamin24_0-1741861495767.png

I have my hours for lines, week day for columns and the count of my tickets as a value, I activate subtotal for columns and lines( in the format parameters of the matrix) and I would like to add one columns and one line(or add the percentage directly with the subttotal column and line) with the percentage for my subtotal compare to the general total. How can I do to add only one column and one line for the subtotal ? thank you

 

1 ACCEPTED SOLUTION

You can't do this with native visuals. You'd have to look at Deneb or some other custom visual 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

But with those measures I get de percentage for each columns(monday,tuesday etc) and I would like to get the percentage only for subtotal, how can I do that ? thank you in advance

Deku
Super User
Super User

Var grandtotal= 

Calculate([Measure], Allselected())

Return

If( 

( Not Isinscope(table[month])  && isinscope(table[hour])) || 

( Isinscope(table[month])  && not isinscope(table[hour])),

Format(

Divide([Measure], grandTotal),

"#%"

),

[Measure]

)


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
Anonymous
Not applicable

I get the good result but as the other solutions, I have one column for each days and I want only one column for my total, how can I choose the display of the columns ? thanks

Can you share a image of what you want it to look like


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
Anonymous
Not applicable

Benjamin24_0-1741874703113.png

Something like with all sub percentage for the total of axis Y and the same for the the subtotal of axix X

You can't do this with native visuals. You'd have to look at Deneb or some other custom visual 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
bhanu_gautam
Super User
Super User

@Anonymous Create measures

 

TotalTickets = SUM('YourTable'[TicketCount])

SubtotalTickets = SUMX(ALLSELECTED('YourTable'), 'YourTable'[TicketCount])

PercentageOfTotal = DIVIDE([SubtotalTickets], [TotalTickets], 0)

 

Add the PercentageOfTotal measure to your matrix, and it will display the percentage of each subtotal compared to the total. This approach ensures that you have a dynamic calculation that respects the context of your matrix, showing the correct percentages for both rows and columns




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.