Forum Discussion
Matrix total calculation
- 3 years ago
Hi mavdom18 ,
In Power BI, the Total row can't be customized. If you want to get the expected result, you need to create a new table contains value "Enterprise" and define its value. Here's my solution:
1.Create a new table. Sort LOB by Index column.
Create relationship between the two tables with LOB column.
2.Create three measures.
HC = IF ( SUM ( 'Table'[HC] ) <> BLANK (), SUM ( 'Table'[HC] ), SUMX ( ALL ( 'Table' ), 'Table'[HC] ) / 15 )Email% = IF ( MAX ( 'Table'[Email%] ) <> BLANK (), MAX ( 'Table'[Email%] ), AVERAGEX ( ALL ( 'Table' ), 'Table'[Email%] ) )Voice% = IF ( MAX ( 'Table'[Voice%] ) <> BLANK (), MAX ( 'Table'[Voice%] ), AVERAGEX ( ALL ( 'Table' ), 'Table'[Voice%] ) )Get the result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi mavdom18 ,
In Power BI, the Total row can't be customized. If you want to get the expected result, you need to create a new table contains value "Enterprise" and define its value. Here's my solution:
1.Create a new table. Sort LOB by Index column.
Create relationship between the two tables with LOB column.
2.Create three measures.
HC =
IF (
SUM ( 'Table'[HC] ) <> BLANK (),
SUM ( 'Table'[HC] ),
SUMX ( ALL ( 'Table' ), 'Table'[HC] ) / 15
)
Email% =
IF (
MAX ( 'Table'[Email%] ) <> BLANK (),
MAX ( 'Table'[Email%] ),
AVERAGEX ( ALL ( 'Table' ), 'Table'[Email%] )
)
Voice% =
IF (
MAX ( 'Table'[Voice%] ) <> BLANK (),
MAX ( 'Table'[Voice%] ),
AVERAGEX ( ALL ( 'Table' ), 'Table'[Voice%] )
)
Get the result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.