Reply
avatar user
Anonymous
Not applicable
Syndicated - Inbound

Número de miembros del equipo por gerente

Source Community: Power BI

Hola a todos,

Estoy tratando de crear una medida que cuente el número de miembros del equipo bajo cada gerente. Ya tengo una relación de muchos a uno entre los datos de los empleados y la tabla de nombres de gerente.

¡Por favor, ayúdenme! Parece simple, pero no puedo entender qué le pasa a mi modelo.

Esta es la medida que tengo:

NumofTeamMembersTM CALCULATE(COUNTA('Employee'[Name]),'Employee' [ManagerName]'Managers'[ManagerName])

El mensaje de error es el siguiente: la expresión contiene varias columnas, pero solo se puede utilizar una sola columna en una expresión True/False que se utiliza como expresión de filtro de tabla.

Screenshot 2020-12-18 160549.jpg

Cualquier ayuda es realmente apreciada, gracias!!

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

Source Community: Power BI
Syndicated - Inbound

@tedr28 Pruebe solo una medida simple:

NumofTeamMembers COUNTA('Empleado'[Nombre])

A continuación, coloque esto en un objeto visual en la tabla Valores con Administrador, columna Administrador en el campo columnas/filas/eje (dependiendo del objeto visual que seleccione).

Además, establezca la dirección del filtro cruzado de su relación en single si no la necesita para ambos. https://excelwithallison.blogspot.com/2020/08/its-complicated-relationships-in-power_92.html


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

5 REPLIES 5
AllisonKennedy
Super User
Super User

Source Community: Power BI
Syndicated - Inbound

@tedr28 De nada. 🙂


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

avatar user
Anonymous
Not applicable

Source Community: Power BI
Syndicated - Inbound

Gracias, la función funciona!!

AllisonKennedy
Super User
Super User

Source Community: Power BI
Syndicated - Inbound

@tedr28 Pruebe solo una medida simple:

NumofTeamMembers COUNTA('Empleado'[Nombre])

A continuación, coloque esto en un objeto visual en la tabla Valores con Administrador, columna Administrador en el campo columnas/filas/eje (dependiendo del objeto visual que seleccione).

Además, establezca la dirección del filtro cruzado de su relación en single si no la necesita para ambos. https://excelwithallison.blogspot.com/2020/08/its-complicated-relationships-in-power_92.html


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

amitchandak
Super User
Super User

Source Community: Power BI
Syndicated - Inbound

@tedr28, no veo necesidad de esta unión

NumofTeamMembersTM CALCULATE(COUNTA('Employee'[Name]))

si es necesario va a funcionar como

NumofTeamMembersTM CALCULATE(COUNTA('Employee'[Name]),filter('Employee', 'Employee' [ManagerName]-max('Managers'[ManagerName])))

si necesita Promedio

averagex(Values('Managers'[ManagerName]) , CALCULATE(COUNTA('Employee'[Name])))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
avatar user
Anonymous
Not applicable

Source Community: Power BI
Syndicated - Inbound

Gracias, funciona!!

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)