Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
shanco
Frequent Visitor

Número total de filas en una matriz basada en la columna 1

Estoy tratando de construir un informe que usamos para mostrar a una de las agencias gubernamentales cuántos empleados fueron entrenados por un instructor específico. He creado el informe utilizando la vizualización Matrix, pero sólo necesito un recuento del número de empleados que formaron en la columna de extrema derecha. Resolvería esto en Excel con un cálculo sumif. La matriz se configura con el Entrenador y el Empleado en la sección Filas y las Habilidades están en la sección Valores. Esto es lo que necesito construir:

Matrix1.png

Además, ¿hay alguna manera de hacerlo de esta manera?

Matrix2.png

1 ACCEPTED SOLUTION

@shanco

Mantenga al empleado en Filas, pero también agregue a Valores (puede arrastrarlo desde el panel de campos directamente).

De lo contrario, pruebe la medida que sugerí.

Usted querrá elegir 'contar' como la opción.

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

6 REPLIES 6
AllisonKennedy
Super User
Super User

@shanco

¿Hasta dónde has llegado con esto?
Usted debe ser capaz de agregar Empleado en los Valores, así como Habilidades Probadas y que debe darle el recuento, y los subtotales le dará los 3, 2 valores que desea.

De lo contrario, puede realizar una medida explícita:

Recuento de empleados: recuento(tabla[empleados])

El sumif se realizará automáticamente por el objeto visual de la matriz.

Puedes jugar con el formato de la matriz, como ajustar el diseño escalonado o desactivarlo para obtener la última imagen que quieras:
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-matrix-visual#stepped-layout-with-matrix-v...

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

Gracias @AllisonKennedy

Cuando muevo Empleado hacia abajo al valor, solo obtengo estas opciones: Primero, Last, Count, Count (Distinct). ¿Cómo consigo que muestre a todos los empleados?

@shanco

Mantenga al empleado en Filas, pero también agregue a Valores (puede arrastrarlo desde el panel de campos directamente).

De lo contrario, pruebe la medida que sugerí.

Usted querrá elegir 'contar' como la opción.

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

Gracias @AllisonKennedy

Esto hizo el truco. Me estoy acercando mucho.

Ahora entiendo esto:

Matrix2-no-subtotal.png

Si agredo subtotal obtengo esto:

Matrix2-subtotal.png

¿Hay alguna manera de eliminar el intento de total de la columna Habilidades probadas? Sólo quiero que se totalice la columna de recuento.

Puede crear una medida personalizada para Habilidades probadas para que no intente totalizar cuando se selecciona más de un empleado (problema de sumas de medida de búsqueda por @Greg_Deckler)o mover Habilidades probadas a filas.

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

Solucioné la última parte de ocultar los totales de las columnas de texto mediante la opción Formato de campo como se describe en: https://radacad.com/removing-the-total-value-for-a-column-in-the-table-visual-of-power-bi-using-isfi...

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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