Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hola
Soy un novato y trato de entender y clasificar los puntos dados a casa por año grupo con estos datos simples: He hecho en excel ningún problema de trabajo de rango, pero trato de clasificarlo en power bi con esto:
rankingbyyear =
RANKX(
FILTER('data House points','data House points'[Year]=BEFORE('data House points'[Year])),
'puntos de la casa de datos'[puntos],
,ASC
)
me dio un error: Query(2,1) La sintaxis de "RANKX" es incorrecta.
Cualquier puntero será muy apreciado. Gracias de antemano.
| Año | Casa - Matrix | Puntos | Rango |
| Año 9 | Slytherin | 1126 | 3 |
| Año 9 | Hufflepuff | 1214 | 4 |
| Año 9 | Ravenclaw | 1093 | 2 |
| Año 9 | Gryffindor | 979 | 1 |
| Año 8 | Slytherin | 727 | 2 |
| Año 8 | Hufflepuff | 470 | 1 |
| Año 8 | Ravenclaw | 893 | 4 |
| Año 8 | Gryffindor | 846 | 3 |
| Año 7 | Slytherin | 1759 | 4 |
| Año 7 | Hufflepuff | 1293 | 3 |
| Año 7 | Ravenclaw | 961 | 1 |
| Año 7 | Gryffindor | 1025 | 2 |
| Año 13 | Slytherin | -4 | 2 |
| Año 13 | Hufflepuff | 9 | 3 |
| Año 13 | Ravenclaw | 9 | 3 |
| Año 13 | Gryffindor | -7 | 1 |
| Año 12 | Slytherin | 5 | 3 |
| Año 12 | Hufflepuff | -13 | 2 |
| Año 12 | Ravenclaw | 8 | 4 |
| Año 12 | Gryffindor | -22 | 1 |
| Año 11 | Slytherin | 170 | 2 |
| Año 11 | Hufflepuff | 224 | 3 |
| Año 11 | Ravenclaw | 288 | 4 |
| Año 11 | Gryffindor | 86 | 1 |
| Año 10 | Slytherin | 464 | 1 |
| Año 10 | Hufflepuff | 569 | 3 |
| Año 10 | Ravenclaw | 600 | 4 |
| Año 10 | Gryffindor | 511 | 2 |
Hola Barthel, muchas gracias que lo hace perfectamente.
Hola @Strikemaster,
Pruebe esta medida:
Rank =
RANKX (
CALCULATETABLE ( 'Table', VALUES ( 'Table'[Year] ), ALLSELECTED () ),
CALCULATE ( SUM ( 'Table'[Points] ) ),
,
ASC
)If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.