Forum Discussion
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:
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)
7 Replies
- tamerj1
Community Champion
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
)- AnonymousNot applicable
Hi,
The column in the rows of the matrix is in another table, so the summarize part is not working.
- tamerj1
Community Champion
Anonymous
In this case you can use
CROSSJOIN ( VALUES ( Table1[Column] ), VALUES ( Table2[Column] ) )
- AnonymousNot applicable
for some reason its still not summing up to the correct values:
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)- tamerj1
Community Champion
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)- AnonymousNot applicable
Perfect! Thank you so much