Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Calculated column for highest rank in each group

I have the following new table based upon another which has a ranking for each StudentID based on dates and other data within the original table.  As the Academic Year moves forward additional rows are brought into the new table, so the rows for each student and therefore the rank will increase:

 

StudentIDRank
Student11
Student12
Student13
Student21
Student22
Student23
Student31
Student32
Student41
Student42
Student43
Student44

 

Within this new table I wish to add a column which identifies as TRUE or FALSE which row is the highest ranked for each studentID, as follows.  Again this will change as new rows are added through the year:

 

StudentIDRankHighestRank?
Student11FALSE
Student12FALSE
Student13TRUE
Student21FALSE
Student22FALSE
Student23TRUE
Student31FALSE
Student32TRUE
Student41FALSE
Student42FALSE
Student43FALSE
Student44TRUE

 

All help gratefully received, thank you.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a new column like

 


new column =
if([Rank] =maxx(filter(Table, [StudentID] = earlier([StudentID])),[Rank]), True(), false())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Anonymous 

HighestRank? =
VAR max_ =
    CALCULATE ( MAX ( Table1[Rank] ), ALLEXCEPT ( Table1, Table1[StudentID] ) )
RETURN
    Table1[Rank] = max_

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

amitchandak
Super User
Super User

@Anonymous , Create a new column like

 


new column =
if([Rank] =maxx(filter(Table, [StudentID] = earlier([StudentID])),[Rank]), True(), false())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

That seems to work perfectly, thank you

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors