Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
590 B
1
Indexable
Never
% Inc. Teórico = 
VAR vType = SELECTEDVALUE('Type Slicer'[Type])
var vMeasurePlan = IF(vType = "HORAS", sum('GUIA PEPs'[Horas Planif.]), sum('GUIA PEPs'[Imp.Plan]))

var vIni = CALCULATE(MAX('GUIA PEPs'[Ini.Plan])) //Añadido nuevo
var vFin = CALCULATE(MAX('GUIA PEPs'[Fin.Plan]))
var vCierre = MAX('Calendar Created'[Date])
var vDuracion = DATEDIFF(vIni, vFin, MONTH) +1
var vTiempo = DATEDIFF(vIni, vCierre, MONTH) +1

RETURN IF(NOT(SELECTEDVALUE('GUIA PEPs'[Elem.PEP])), vTiempo, vTiempo / vDuracion)


// return IF(NOT(ISBLANK(vMeasurePlan)), vTiempo / vDuracion, BLANK())