Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have this DAX measure:
The problem is that when we're in the global context, the mesure returns 0 because "Horas" is lower than "AsignadoGlobal" and I want to return the resulted total inside of the IF clause.
@Anonymous ,
Try measure like
Var TablaCalculo = ADDCOLUMNS(
VALUES('PartesTrabajo'[Empleado_ID]),
"Horas", SUM('PartesTrabajo'[Horas]),
"AsignadoGlobal", [asignado_global],
"Diff", SUM('PartesTrabajo'[Horas]) - [asignado_global]
)
RETURN
SUMX(TablaCalculo,
IF(
MAX(OrdTrabGeTr[Estado]) = "Abierta",
[AsignadoGlobal], // Return the actual negative total
[Diff] // Optionally, handle other cases if needed
)
)
I think that the "MAX(OrdTrabGeTr[Estado]) = "Abierta" is going to return always only one branch.
I need this condition to check if a Work Order (the record) is still open, and when is the total "case" I just want to forget it and take the result of this logic.
Given this desviation:
Is resulting in 0 because of the problem with the measure that I've described earlier.
Expected result: 0 + 14,4 + 7 + 2,5 = 23,9