Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hola, necesito crear una medida dax para saber cuántas personas informan a una persona, en una estructura org típica.
Mi tabla de datos de la organización tiene todos los empleados junto con su jefe de equipo, gerente y director como columnas separadas.
Si la persona es un gerente, no hay un líder de equipo para él. Pero hay un director en la cima.
Necesito saber cuántas personas debajo de cada persona. Ver datos de muestra en la foto de abajo
Paso bastante tiempo, probando con filtros/cuenta, su no llevándome anywhere. Agradezco enormemente su ayuda.
Solved! Go to Solution.
Pude hacer que funcionara con el siguiente script
Team Count =
var currentName = Sheet1[Employee Name]
var cnt =
SWITCH(Sheet1[Position],
"TL",
calculate(
COUNT(Sheet1[Employee Name]),
FILTER(Sheet1, Sheet1[Team Lead]=currentName)
),
"M",
calculate(
COUNT(Sheet1[Employee Name]),
FILTER(Sheet1, Sheet1[Manager]=currentName)
),
"D",
calculate(
COUNT(Sheet1[Employee Name]),
FILTER(Sheet1, Sheet1[Director]=currentName)
),
0
)
return cnt
Pude hacer que funcionara con el siguiente script
Team Count =
var currentName = Sheet1[Employee Name]
var cnt =
SWITCH(Sheet1[Position],
"TL",
calculate(
COUNT(Sheet1[Employee Name]),
FILTER(Sheet1, Sheet1[Team Lead]=currentName)
),
"M",
calculate(
COUNT(Sheet1[Employee Name]),
FILTER(Sheet1, Sheet1[Manager]=currentName)
),
"D",
calculate(
COUNT(Sheet1[Employee Name]),
FILTER(Sheet1, Sheet1[Director]=currentName)
),
0
)
return cnt