Forum Discussion
Syndicate_Admin
Administrator
4 years agoTotales incorrectos - Matriz
¡Buenos días! Creo que tengo una situación bastante compleja y agradecería mucho algo de ayuda. Específicamente, no puedo obtener los totales para identificar correctamente la fila, columna ...
- 4 years ago
Customer Inflation with Fixed Totals = VAR vTable = ADDCOLUMNS( SUMMARIZE('Invoice History', 'Date'[Fiscal Year Number], 'Date'[Month], 'Invoice History'[Site], 'Invoice History'[Item Number] ), "@inflation", [Customer Inflation] ) VAR TotalInflation = SWITCH( TRUE(), HASONEVALUE('Date'[Month]) && HASONEVALUE('Invoice History'[Item Number]), [Customer Inflation], // Base data HASONEVALUE('Date'[Month]), CALCULATE( SUMX( vTable, [@inflation] ) ), // column totals, HASONEVALUE('Invoice History'[Item Number]), // row totals CALCULATE( SUMX( vTable, [@inflation] ), VALUES('Date'[Month]) ), // grand total SUMX( vTable, [@inflation] ) ) RETURN TotalInflationSolución de trabajo
Syndicate_Admin
Administrator
4 years agoCustomer Inflation with Fixed Totals =
VAR vTable =
ADDCOLUMNS(
SUMMARIZE('Invoice History',
'Date'[Fiscal Year Number],
'Date'[Month],
'Invoice History'[Site],
'Invoice History'[Item Number]
),
"@inflation", [Customer Inflation]
)
VAR TotalInflation =
SWITCH(
TRUE(),
HASONEVALUE('Date'[Month]) && HASONEVALUE('Invoice History'[Item Number]),
[Customer Inflation], // Base data
HASONEVALUE('Date'[Month]),
CALCULATE(
SUMX( vTable,
[@inflation]
)
), // column totals,
HASONEVALUE('Invoice History'[Item Number]), // row totals
CALCULATE(
SUMX(
vTable,
[@inflation]
),
VALUES('Date'[Month])
), // grand total
SUMX(
vTable,
[@inflation]
)
)
RETURN
TotalInflationSolución de trabajo