cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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?

1 ACCEPTED SOLUTION
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] )
)
``````

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.

2 REPLIES 2
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] )
)
``````

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.

Solution Sage

Hi @egrospe17 .
You can try conditional formatting your total row.

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

Regards,
Sanket Bhagwat

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors