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

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.

Reply
Anonymous
Not applicable

Calcular el promedio de métricas mes a mes

Hola

Estoy tratando de crear un objeto visual para mostrar el promedio mes a mes para cada prioridad.

Si nos fijamos en esta foto de abajo esto muestra los datos con los que estoy trabajando:

powerBI Question.JPG

Para cada mes dentro del año necesito mostrar el total de cada prioridad y el porcentaje de satisfecha. Feb por ejemplo mostraría: 27 para el total y 81% para el cumplido. Creo que esto podría hacerse creando nuevas columnas dentro del conjunto de datos y usando instrucciones IF para convertirlas en un 1 o 0 después de lo cual realizar una adición y división. Sin embargo, creo que hay una manera más fácil.

Gracias por su ayuda!

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hola @AlexKeith53

probar medidas

Total for priority = CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]) )

Y

%Met = 
DIVIDE(
CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]), Table[Met MTTR] = TRUE() ),
[Total for priority]
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

5 REPLIES 5
az38
Community Champion
Community Champion

Hola @AlexKeith53

probar medidas

Total for priority = CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]) )

Y

%Met = 
DIVIDE(
CALCULATE(SUM(Table[Count of Incident Number]), ALLEXCEPT(Table, Table[Year], Table[Month], Table[Priority]), Table[Met MTTR] = TRUE() ),
[Total for priority]
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hola @az38,

¡Esto es muy útil! Tuve un pequeño problema con esto. Parece que esto requiere una medida dentro de una medida para que yo obtenga el número de incidente. He creado una medida para realizar eso; sin embargo, estoy recibiendo el siguiente error:

Total de prioridad: CALCULATE(SUM([Count of Incident Number]), ALLEXCEPT(Sheet1, Sheet1[Year], Sheet1[Month], Sheet1[Priority]) )
La función SUM solo acepta una referencia de columna como el argumento número 1. / El parámetro no es el tipo correcto
¿Has experimentado esto antes? También intenté crear sólo 1 línea, pero todavía tengo el mismo error de parámetro incorrecto:
Total de prioridad: CALCULATE(SUM(COUNT(Sheet1[Incident Number]), ALLEXCEPT(Sheet1, Sheet1[Year], Sheet1[Month], Sheet1[Priority]) ))
¡¡Gracias!!
az38
Community Champion
Community Champion

Hola @AlexKeith53

para usar la medida dentro de SUM() probar la función SUMX() como

Total for priority = CALCULATE(SUMX(Sheet1, [Count of Incident Number]), ALLEXCEPT(Sheet1, Sheet1[Year], Sheet1[Month], Sheet1[Priority]) )


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38,

¡Gracias, eso funcionó brillantemente! Me faltaba la sábana1 en el comienzo.

az38
Community Champion
Community Champion

@AlexKeith53

Intentó usar SUM que no necesita una tabla, pero solo puede funcionar con Columnas

SUMX(), COUNTX, AVERAGEX() están trabajando con expresiones. se puede leer aquí https://docs.microsoft.com/en-us/dax/sumx-function-dax


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.