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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
afaherty
Helper IV
Helper IV

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
Super User
Super User

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
Super User
Super User

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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