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
Syndicate_Admin
Administrator
Administrator

Suma el promedio de promedios por categoría

Hola

Me gustaría tomar el promedio de cada categoría y luego sumarlos sin tomar el promedio total. Sin embargo, actualmente la suma es el promedio total.

Actualmente este es mi código:

Promedio 4 = CALCULAR(
PROMEDIOX(
RESUMIR( 'Prueba', 'Prueba'[categoría], 'Prueba'[Id]),
CALCULAR( Suma( «Prueba» [valor» )
), ALLEXCEPT( 'Test', 'Test'[Categoría])
)

HELP_PLS_0-1663053578639.png

Estoy tratando de que el total sea Promedio = 0 '+ 1.71 + 22.88 + 0 + 4.6

1 ACCEPTED SOLUTION

Hola

Encontré una solución

Promedio 7 =
SUMX (
VALORES ( «Ensayo»[Categoría]),
PROMEDIO ( «Prueba»[Valor] )
)

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

@HELP_PLS , Prueba como

AVerage 4 = CALCULAR(
AVERAGEX(
RESUMIR( 'Prueba', 'Prueba'[categoría]),
CALCULATE( SUM( 'Test'[valor) )
), ALLEXCEPT( 'Test', 'Test'[Categoría])

)

o

AVerage 4 = CALCULAR(
AVERAGEX(
RESUMIR( 'Prueba', 'Prueba'[categoría]),
CALCULATE( SUM( 'Test'[valor) )
)

)

Hola

Todavía se encuentra el promedio para cada categoría A, B, C, D, E y luego para el "total" se está sumando cada promedio A, promedio B.... luego dividiendo por 5. Solo me gustaría tomar el promedio de cada categoría y agregarlos a togther

Aquí hay otra medida que probé, que me da los promedios correctos pero no me deja sumar los valores

Promedio =
CALCULAR(
PROMEDIO(«Prueba»[Valor]),
FILTRO ( TODOSSELECCIONADOS ( 'Prueba' ), 'Prueba' [categoría] = Máximo ( «Ensayo» [categoría» )
)

Hola

Encontré una solución

Promedio 7 =
SUMX (
VALORES ( «Ensayo»[Categoría]),
PROMEDIO ( «Prueba»[Valor] )
)

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.