Forum Discussion
ColinH
4 years agoFrequent Visitor
RankX problems
Hi, I struggle with RANKX when filtering. Can someone help me with this problem, please? I have a table that lists soccer seasons with teams. I've created a new column (AllSeasonsFiling) that, when ...
- 4 years ago
ColinH here is your measure, ofcourse you already have the solution but we always want to avoid adding a column (where possible):
Rank Team Season = RANKX ( FILTER ( ALL ( TeamSeason ), TeamSeason[Season] = MAX ( TeamSeason[Season] ) ), CALCULATE ( MAX ( TeamSeason[AllSeasonsFiling] ) ), , DESC )
ColinH
4 years agoFrequent Visitor
Hi, thank you so much, but it's not quite doing what I'd hoped - probably my fault for explaining badly. I wish the filter to be by team, and the result to be a table showing that team's position over multiple years. Your solution has it the other way round. I'm afraid I don't seem to be able to upload a pbix like you, so I can only show a screenshot. Here Arsenal are selected and they are incorrectly evaluating to rank 1. (This is using your provided pbix, not mine, so the data is the same as I attached earlier)
ā