Forum Discussion

ColinH's avatar
ColinH
Frequent Visitor
4 years ago
Solved

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 ...
  • smpa01's avatar
    smpa01
    4 years ago

    ColinH  you can create a column like following

    Column = RANKX(FILTER('Table 1','Table 1'[Season]=EARLIER('Table 1'[Season])),'Table 1'[AllSeasonsFiling],,DESC)

     

    yet to figure out the measure

  • parry2k's avatar
    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 
    )