Forum Discussion
Problem with SUMX and Matrix
- 7 years ago
hi, AlejandroPCar
This looks like a measure totals problem. Very common. See this post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907You may try to add a new measure
Measure = IF(HASONEVALUE(Energia[intervencion]),[Inmediato_1], CALCULATE( CALCULATE( COUNTROWS(Energia), Separacion[ifuturo] = 1 ), FILTER( Separacion, (VALUES(Tiempo_Inicial[Fecha_Mes]) >= Separacion[fechain] && VALUES(Tiempo_Inicial[Fecha_Mes]) >= Separacion[fechafi]) || (VALUES(Tiempo_Final[Fecha_Mes]) >= Separacion[fechain] && VALUES(Tiempo_Final[Fecha_Mes]) >= Separacion[fechafi]) )))Result:
Best Regards,
Lin
hi, AlejandroPCar
This looks like a measure totals problem. Very common. See this post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
You may try to add a new measure
Measure = IF(HASONEVALUE(Energia[intervencion]),[Inmediato_1],
CALCULATE(
CALCULATE(
COUNTROWS(Energia),
Separacion[ifuturo] = 1
),
FILTER(
Separacion,
(VALUES(Tiempo_Inicial[Fecha_Mes]) >= Separacion[fechain] &&
VALUES(Tiempo_Inicial[Fecha_Mes]) >= Separacion[fechafi]) ||
(VALUES(Tiempo_Final[Fecha_Mes]) >= Separacion[fechain] &&
VALUES(Tiempo_Final[Fecha_Mes]) >= Separacion[fechafi])
)))
Result:
Best Regards,
Lin
- AlejandroPCar7 years agoHelper IV