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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
egrospe17
Frequent Visitor

Matrix total/subtotal row customization

Hello BI Gurus,

I have a matrix visual in my power BI report which displays different data in each columns. On the total row on the bottom, is there a way to customize it? For example, on a column where the data is Yes/No, i don't want to total to show. For "highway speed limit" column, I want to use average. For "# of approach lanes", i would like to use SUM. Is there an easy way to accomplish this?

 

egrospe17_0-1637041026400.png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @egrospe17 

 

You can try to control total with a function.

School Buses M =
IF (
    HASONEVALUE ( 'Table'[School Buses] ),
    MAX ( 'Table'[School Buses] ),
    BLANK ()
)
Highway Lpeed Limit M =
IF (
    HASONEVALUE ( 'Table'[Highway Lpeed Limit] ),
    MAX ( 'Table'[Highway Lpeed Limit] ),
    AVERAGE ( 'Table'[Highway Lpeed Limit] )
)
# of approach lanes M =
IF (
    HASONEVALUE ( 'Table'[# of approach lanes] ),
    MAX ( 'Table'[# of approach lanes] ),
    SUM ( 'Table'[# of approach lanes] )
)

vzhangti_0-1637315738156.png

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @egrospe17 

 

You can try to control total with a function.

School Buses M =
IF (
    HASONEVALUE ( 'Table'[School Buses] ),
    MAX ( 'Table'[School Buses] ),
    BLANK ()
)
Highway Lpeed Limit M =
IF (
    HASONEVALUE ( 'Table'[Highway Lpeed Limit] ),
    MAX ( 'Table'[Highway Lpeed Limit] ),
    AVERAGE ( 'Table'[Highway Lpeed Limit] )
)
# of approach lanes M =
IF (
    HASONEVALUE ( 'Table'[# of approach lanes] ),
    MAX ( 'Table'[# of approach lanes] ),
    SUM ( 'Table'[# of approach lanes] )
)

vzhangti_0-1637315738156.png

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

SanketBhagwat
Solution Sage
Solution Sage

Hi @egrospe17 .
You can try conditional formatting your total row.
Learn about it on https://www.youtube.com/watch?v=7C1vpG-JQ9I.

 

If this post helps you, then mark it as 'Accept as Solution' so that it could help others.

 

Regards,
Sanket Bhagwat

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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