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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Total Sum in matrix

Hi all,

 

I have a matrix where I calculate a value for each cell, and I need the total to be the sum of the values shown on the matrix. 

 

This is the measure that is being used in the matrix: 

Oportunidade = [Delta KPI]*calculate(SUMX('Reajuste coletivo','Reajuste coletivo'[VL_OBRIGACAO_MES_CONTRATO]),'Reajuste coletivo'[DT_REFERENCIA]="2023")*MEDIAN('Reajuste coletivo'[REAJUSTE])*12/100
 
where Delta KPI = 
CALCULATE('Reajuste coletivo'[% isento],'Reajuste coletivo'[DT_REFERENCIA]="2022")-CALCULATE('Reajuste coletivo'[% isento],'Reajuste coletivo'[DT_REFERENCIA]="2023")
 
belaberger2_0-1675953907812.png

 

1 ACCEPTED SOLUTION

@Anonymous 

Sorry I missed to wrap MEDIAN with CALCULATE 

 

Oportunidade =
SUMX (
CROSSJOIN ( VALUES ( 'De para filial'[ESTADO] ), VALUES( 'Reajuste coletivo'[Faixa de vidas]) ),
[Delta KPI]
* CALCULATE (
SUMX ( 'Reajuste coletivo', 'Reajuste coletivo'[VL_OBRIGACAO_MES_CONTRATO] ),
'Reajuste coletivo'[DT_REFERENCIA] = "2023"
)
* CALCULATE ( MEDIAN ( 'Reajuste coletivo'[REAJUSTE] ) ) * 12 / 100
)

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

for some reason its still not summing up to the correct values:

belaberger2_0-1675961718432.png

 

Oportunidade =
SUMX (
CROSSJOIN ( VALUES ( 'De para filial'[ESTADO] ), VALUES ( 'Reajuste coletivo'[Faixa de vidas]) ),
[Delta KPI]
* CALCULATE (
SUMX ( 'Reajuste coletivo', 'Reajuste coletivo'[VL_OBRIGACAO_MES_CONTRATO] ),
'Reajuste coletivo'[DT_REFERENCIA] = "2023"
)
* MEDIAN ( 'Reajuste coletivo'[REAJUSTE] ) * 12 / 100
)

 

@Anonymous 

Sorry I missed to wrap MEDIAN with CALCULATE 

 

Oportunidade =
SUMX (
CROSSJOIN ( VALUES ( 'De para filial'[ESTADO] ), VALUES( 'Reajuste coletivo'[Faixa de vidas]) ),
[Delta KPI]
* CALCULATE (
SUMX ( 'Reajuste coletivo', 'Reajuste coletivo'[VL_OBRIGACAO_MES_CONTRATO] ),
'Reajuste coletivo'[DT_REFERENCIA] = "2023"
)
* CALCULATE ( MEDIAN ( 'Reajuste coletivo'[REAJUSTE] ) ) * 12 / 100
)
Anonymous
Not applicable

Perfect! Thank you so much

tamerj1
Super User
Super User

Hi @Anonymous 

please try

Oportunidade =
SUMX (
SUMMARIZE (
'Reajuste coletivo',
'Reajuste coletivo'[column in rows of the matrix],
'Reajuste coletivo'[column in columns of the matrix]
),
[Delta KPI]
* CALCULATE (
SUMX ( 'Reajuste coletivo', 'Reajuste coletivo'[VL_OBRIGACAO_MES_CONTRATO] ),
'Reajuste coletivo'[DT_REFERENCIA] = "2023"
)
* MEDIAN ( 'Reajuste coletivo'[REAJUSTE] ) * 12 / 100
)

Anonymous
Not applicable

Hi,

 

The column in the rows of the matrix is in another table, so the summarize part is not working.

@Anonymous 

In this case you can use 

CROSSJOIN ( VALUES ( Table1[Column] ), VALUES ( Table2[Column] ) )

Anonymous
Not applicable

for some reason its still not summing up to the correct values:

belaberger2_0-1675962028982.png

 

 

Oportunidade =
SUMX (
CROSSJOIN ( VALUES ( 'De para filial'[ESTADO] ), VALUES ( 'Reajuste coletivo'[Faixa de vidas]) ),
[Delta KPI]
CALCULATE (
SUMX ( 'Reajuste coletivo''Reajuste coletivo'[VL_OBRIGACAO_MES_CONTRATO] ),
'Reajuste coletivo'[DT_REFERENCIA] = "2023"
)
MEDIAN ( 'Reajuste coletivo'[REAJUSTE] ) * 12 / 100
)

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.