Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Tengo un conjunto de datos en el que estoy tratando de crear una tabla o matriz que muestre el valor máximo de un año determinado y el nombre correspondiente de la persona. Estos datos son estadísticas de la NBA. Quiero ser capaz de mostrar al jugador de cada temporada el mayor número de puntos por partido. Con la tabla ordenada por temporadas. A continuación tengo un pequeño conjunto de muestras y luego lo que quiero que muestre el objeto visual.
Datos de ejemplo:
| Año | Jugador | Partidos jugados | Puntos | Pts por G |
| 2016 | James Harden | 82 | 2376 | 29.0 |
| 2017 | Russell Westbrook | 81 | 2558 | 31.6 |
| 2017 | James Harden | 81 | 2356 | 29.1 |
| 2015 | James Harden | 81 | 2217 | 27.4 |
| 2016 | Stephen Curry | 79 | 2375 | 30.1 |
| 2017 | Isaías Tomás | 76 | 2199 | 28.9 |
| 2017 | Anthony Davis | 75 | 2099 | 28.0 |
| 2016 | Kevin Durant | 72 | 2029 | 28.2 |
| 2015 | LeBron James | 69 | 1743 | 25.3 |
| 2015 | Anthony Davis | 68 | 1656 | 24.4 |
| 2015 | Russell Westbrook | 67 | 1886 | 28.1 |
| 2015 | Kevin Durant | 27 | 686 | 25.4 |
Resultado visual:
| Año | Jugador | Partidos jugados | Puntos | Pts por G |
| 2015 | Russell Westbrook | 67 | 1886 | 28.1 |
| 2016 | Stephen Curry | 79 | 2375 | 30.1 |
| 2017 | Russell Westbrook | 81 | 2558 | 31.6 |
Hola @kkassel
@ThxAlot @Ashish_Mathur BUENA RESPUESTA!
Tengo otro método.
Puede crear una medida.
Measure =
VAR _max = CALCULATE(MAX([Pts per G]), ALLEXCEPT('Table', 'Table'[Year]))
RETURN
IF( MAX([Pts per G]) = _max, 1, 0)
Coloque la medida en los filtros de nivel visual, configure mostrar elementos cuando el valor sea 1.
Saludos
Yulia Xu
Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola
Este código M también funciona
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dZHLasMwEEV/RXgdjDWyHl62zaKvVVvoImShEoFNE6lIdiB/X80oIY4hG4lBZ+7cudpsKmi4qlbVqz24xJ5t3DmfSwP5AKHxCbpquyJQ5+pjSsnt9+zbpfEnhvCLNEdMSpMvwWs155fChApZhGt+QeU9FEgFdN1eUGz9HN1f7zx7mmI85Vp3xS/KiOYqi70vyQ62Z199ONiELM3mHbWY+ma7Bz/2wZ/Y2h4HYlEQmjM7d/DmjoNn6ylaPyJIgTVwFoX5Xu/uMQbPaL1cKmS4bgWFVos5upyvMFKuSlztNQN55ycULsGNUcXGTbwLx6BJXxUXWXn7Dw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Year = _t, Player = _t, #"Games Played" = _t, Points = _t, #"Pts per G" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", Int64.Type}, {"Player", type text}, {"Games Played", Int64.Type}, {"Points", Int64.Type}, {"Pts per G", type number}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Year"}, {{"Pl", each Table.Max(_,"Player")}, {"Max", each List.Max([Pts per G]), type nullable number}}),
#"Expanded Pl" = Table.ExpandRecordColumn(#"Grouped Rows", "Pl", {"Player"}, {"Player"}),
#"Sorted Rows" = Table.Sort(#"Expanded Pl",{{"Year", Order.Ascending}})
in
#"Sorted Rows"
Espero que esto ayude.
Hola
Pruebe estas medidas
PPG = MAX(Data[Pts per G])Pl = CONCATENATEX(TOPN(1,VALUES(Data[Player]),[PPG]),Data[Player],", ")
Espero que esto ayude.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!