Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hola tengo una columna de datos Género
Necesito contar hombres y mujeres y el porcentaje promedio será del 50%
Si desea calcular el porcentaje de hombres y mujeres en el total, puede probar este código.
Percentage =
VAR _Total =
CALCULATE ( COUNT ( 'Table'[User] ), ALL ( 'Table' ) )
VAR _Each_Gender =
CALCULATE ( COUNT ( 'Table'[User] ) )
RETURN
DIVIDE ( _Each_Gender, _Total )
Mi muestra:
El resultado es el siguiente.
Saludos
Rico Zhou
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Medida = CountRows(tabla)
A continuación, coloque un objeto visual con el género y la medida como columna. Se puede agregar dos veces y usar el segundo como % del total.
Si necesita dividirlo en registros separados ...
Medida Masculino =
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.