Forum Discussion
RankX problems
- 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 )
- ColinH4 years agoFrequent Visitor
Apologies, smpa01 hopefully I've done this correctly
Season Team AllSeasonsFiling 1992-93 Arsenal 5602040 1992-93 Aston Villa 7417057 1992-93 Blackburn 7122068 1992-93 Chelsea 5597051 1992-93 Coventry 5195052 1992-93 Crystal Palace 4887048 1992-93 Everton 5298053 1992-93 Ipswich 5195050 1992-93 Leeds 5095057 1992-93 Liverpool 5907062 1992-93 Man City 5705056 1992-93 Man Utd 8436067 1992-93 Middlesbrough 4379054 1992-93 Norwich 7196061 1992-93 Nottingham F 3979041 1992-93 Oldham 4889063 1992-93 QPR 6308063 1992-93 Sheff Utd 5201054 1992-93 Sheff Weds 5904055 1992-93 Southampton 4993054 1992-93 Tottenham 5894060 1992-93 Wimbledon 5401056 1993-94 Arsenal 7125053 1993-94 Aston Villa 5696046 1993-94 Blackburn 8427063 1993-94 Chelsea 5096049 1993-94 Coventry 5598043 1993-94 Everton 4379042 1993-94 Ipswich 4277035 1993-94 Leeds 6825065 1993-94 Liverpool 6004059 1993-94 Man City 4489038 1993-94 Man Utd 9242080 1993-94 Newcastle 7741082 1993-94 Norwich 5304065 1993-94 Oldham 3974042 1993-94 QPR 6001062 1993-94 Sheff Utd 4182042 1993-94 Sheff Weds 6422076 1993-94 Southampton 4283049 1993-94 Swindon 2947047 1993-94 Tottenham 4293052 1993-94 West Ham 5392048 1993-94 Wimbledon 6503056 1994-95 Arsenal 5103052 1994-95 Aston Villa 4795051 1994-95 Blackburn 8941080 1994-95 Chelsea 5395050 1994-95 Coventry 4982044 1994-95 Crystal Palace 4485034 1994-95 Everton 4993044 1994-95 Ipswich 2643036 1994-95 Leeds 7321059 1994-95 Leicester 2865045 1994-95 Liverpool 7428065 1994-95 Man City 4889053 1994-95 Man Utd 8849077 1994-95 Newcastle 7220067 1994-95 Norwich 4283037 1994-95 Nottingham F 7729072 1994-95 QPR 6002061 1994-95 Sheff Weds 5092049 1994-95 Southampton 5398061 1994-95 Tottenham 6208066 1994-95 West Ham 4996044 1994-95 Wimbledon 5583048 - smpa014 years agoCommunity Champion
ColinH you can create two measures like this
_allSeasonFiling = MAX('Table 1'[AllSeasonsFiling]) _rank = RANKX(ALLSELECTED('Table 1'[Team]),[_allSeasonFiling],,DESC)- ColinH4 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)