Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |