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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
afaherty
Helper V
Helper V

Way to have PowerBI pull out student's best test score & create a table?

Hello,

I need to find out if there is a way that PowerBI can pull out every student's best test scores (by test subject) and create a table of them?


For example:

 

Student IDTest SubjectTest DateScore
1English2/1/24100
1English1/1/2480
1English

1/15/24

90
1Math3/1/2475
1Math3/14/2492
1Math4/1/24100
1Math3/24/2495

 

Here is what I'd like the result to be - a table showing this:

Student IDTest SubjectTest DateScore
1English2/1/24100
1Math4/1/24100

 

(There are many more students than just student #1 but you get the idea!)

Thanks in advance!!

1 ACCEPTED SOLUTION
Selva-Salimi
Solution Sage
Solution Sage

Hi @afaherty 

 

you just need to write a column in your table as follows:

 

Column = if (calculate(max('Table'[Score]) , filter ('Table' , 'Table'[Test Subject]=EARLIER('Table'[Test Subject]) && 'Table'[student ID] = EARLIER('Table'[student ID]))) = 'Table'[Score] , 1 ,0)
 
and filter your visual (visual level filter) based on this column and set it to 1.
 
there are lots of other solutions but this is the easiest one that I recommend.
 
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Selva-Salimi
Solution Sage
Solution Sage

Hi @afaherty 

 

you just need to write a column in your table as follows:

 

Column = if (calculate(max('Table'[Score]) , filter ('Table' , 'Table'[Test Subject]=EARLIER('Table'[Test Subject]) && 'Table'[student ID] = EARLIER('Table'[student ID]))) = 'Table'[Score] , 1 ,0)
 
and filter your visual (visual level filter) based on this column and set it to 1.
 
there are lots of other solutions but this is the easiest one that I recommend.
 
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly. 

Perfect! Thank you SO much!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.