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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Kirt1965
Helper III
Helper III

Obtener un recuento de los elementos filtrados que cumplen una determinada condición

Hola a todos,

Sigue siendo nuevo en Power BI, así que discúlpate si lo que te pido es muy fácil.

Estamos comparando las horas del período actual trabajadas con las horas del período anterior trabajadas por empleado. Cada empleado tiene un gerente, un director y un vicepresidente. Tengo medidas para preparar ese trabajo. Están abajo. Tengo un filtro en la página para el mes calendario anterior que llamamos al período actual (no en código, no sé si eso importa) para mostrar solo aquellos donde el cambio de porcentaje es 10% o más.

Lo que quiero es un recuento de casos que cumplan esa condición (> 10%). Por lo tanto, para los datos de ejemplo limitados a continuación, donde VP-VP1 el recuento total sería 2. Cuenta para el Director1 n.o 2. Cuente para Manager1 y 3 a 1 cada uno, pero cuente para Manager2 a 0. Esto es para un gráfico que muestra los recuentos en cada nivel; Vicepresidente, Director, Gerente, etc. y Drillable.

Estoy seguro de que la forma en que mi instinto me dice que vaya está mal , que es marcar una condición cumplida como 1 y no cumplida como 0 y luego sumar los valores de la bandera.

Cualquier ayuda en cómo debería REALMENTE hacer esto sería muy apreciado.

Gracias
Kirt
----------------

Período actual de las horas de OT : SUM(TIMECHARGE[Horas])

Período anterior Ot Horas : CALCULATE([Current Period OT Hours], DATEADD(DateTable[Date],-1,MONTH))

Cambio de porcentaje: DIVIDE([OT Hours Change],[Previous Period OT Hours],BLANK())

VpDirectordirectorEmpleadoHORAS DEL PERÍODO ACTUALHORAS DEL PERÍODO ANTERIORCAMBIO PORCENTUALINCLUIR EN EL RECUENTO
VP1Director1Gerente1Empleado1504025%1
VP1Director1Gerente1Empleado23040-25%0
VP1Director1Gerente2Empleado342405%0
VP1Director1Gerente3Empleado4444010%1
VP1Director2Gerente4Empleado5.......
.......
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Kirt1965 probar esta medida para el recuento

Count over 10 Percent = 
COUNTX ( VALUES ( Table[Employee] ), IF ( [% Change Measure] >= .10, 1 ) )

Me gustaría elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
parry2k
Super User
Super User

@Kirt1965 probar esta medida para el recuento

Count over 10 Percent = 
COUNTX ( VALUES ( Table[Employee] ), IF ( [% Change Measure] >= .10, 1 ) )

Me gustaría elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Gracias por la ayuda. Tuve que jugar con lo que poner en para Table[Employee], pero parece que está funcionando ahora. Te lo agradezco.

Kirt

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.