Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Me gustaría crear medidas para calcular los recuentos de deportes dentro de AllSports de la Tabla 1, así como la calificación media y el sentimiento para cada uno de los Deportes en la Tabla 2. Por ejemplo para el fútbol - el conteo es 2, la calificación promedio es 4, el sentimiento promedio es 0.2.
Quería calcular estas medidas para poder crear un gráfico de burbujas que muestre cada deporte, dimensionado por el conteo, y con la calificación avg y el sentimiento en mis ejes x e y.
No quiero crear una medida para contar para cada deporte, porque entonces puede haber un nóteo de medidas.
@ImkeF No conseguimos encontrar tu ubicación exacta.
Tabla 1:
| Clasificación | Sentimiento | AllSports |
| 4 | 0.6 | Hockey, Frisbee, Golf |
| 5 | 0.3 | Golf, Tenis |
| 3 | 0.2 | Rugby, Hockey |
| 5 | 0.5 | Golf |
| 3 | 0.3 | Fútbol |
| 5 | 0.1 | Fútbol, Golf |
Cuadro 2:
| Deportes |
| Hockey |
| Frisbee |
| Golf |
| Tenis |
| Rugby |
| Fútbol |
Solved! Go to Solution.
Hola @jvirgi ,
Puede crear 2 medidas para calcular el promedio de calificación y sentimiento como se muestra a continuación:
Avg rating =
SUMX (
FILTER (
'Table 1',
SEARCH ( MAX ( 'Table 2'[Sports] ), 'Table 1'[AllSports], 1, 0 ) > 0
),
'Table 1'[Rating]
)
/ COUNTROWS (
FILTER (
'Table 1',
SEARCH ( MAX ( 'Table 2'[Sports] ), 'Table 1'[AllSports], 1, 0 ) > 0
)
)Avg sentiment =
SUMX (
FILTER (
'Table 1',
SEARCH ( MAX ( 'Table 2'[Sports] ), 'Table 1'[AllSports], 1, 0 ) > 0
),
'Table 1'[Sentiment]
)
/ COUNTROWS (
FILTER (
'Table 1',
SEARCH ( MAX ( 'Table 2'[Sports] ), 'Table 1'[AllSports], 1, 0 ) > 0
)
)Saludos
Rena
Hola @jvirgi ,
Puede crear 2 medidas para calcular el promedio de calificación y sentimiento como se muestra a continuación:
Avg rating =
SUMX (
FILTER (
'Table 1',
SEARCH ( MAX ( 'Table 2'[Sports] ), 'Table 1'[AllSports], 1, 0 ) > 0
),
'Table 1'[Rating]
)
/ COUNTROWS (
FILTER (
'Table 1',
SEARCH ( MAX ( 'Table 2'[Sports] ), 'Table 1'[AllSports], 1, 0 ) > 0
)
)Avg sentiment =
SUMX (
FILTER (
'Table 1',
SEARCH ( MAX ( 'Table 2'[Sports] ), 'Table 1'[AllSports], 1, 0 ) > 0
),
'Table 1'[Sentiment]
)
/ COUNTROWS (
FILTER (
'Table 1',
SEARCH ( MAX ( 'Table 2'[Sports] ), 'Table 1'[AllSports], 1, 0 ) > 0
)
)Saludos
Rena
@yingyinr ¡Gracias! Esto es exactamente lo que estaba buscando.
Sin embargo, noto cuando también intento hacer un gráfico de rosquillas de la ruptura del número de deportes, no obtengo nada cuando uso Table2[Deportes] como mi leyenda y los countrows miden como mis valores.
No estoy seguro de si esto es por qué, pero cuando acabo de crear una tabla de matriz para Sport, Count of sports, Avg rating, Average sentiment, the table totals muestra el valor de solo la fila final de la tabla en lugar de un promedio en todas las filas.
@yingyinr En realidad fue mi error, la tabla de rosquillas funcionó bien... Lo tenía configurado mal.
Pero, ¿sabe por qué los totales de tabla de matriz muestran solo el valor de las filas finales?
Hola @jvirgi ,
He creado este archivo como ejemplo: Descargar PBIX
Usé Power Query para dividir el deporte en nuevas filas.
Ricardo
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.