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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
patolattari
Regular Visitor

Filtering

Hi!

 

Quick question, I have a query with the following data:

 

Student Name

Evaluation Date

Score

 

I need to visualize the last score obtained by every student and given that there are many evaluations for each one, I suppose i have to use the Top N filter but i'm not sure, could you please help me with that?

 

thank you!

 

2 REPLIES 2
v-xjiin-msft
Solution Sage
Solution Sage

Hi @patolattari,

 

To achieve your requirement, you can try following measure:

Last Score =
CALCULATE (
    MAX ( 'Table'[Score] ),
    FILTER ( 'Table', 'Table'[Date] = MAX ( 'Table'[Date] ) ),
    ALLEXCEPT ( 'Table', 'Table'[Student] )
)

1e.PNG

 

Thanks,
Xi Jin.

ricardocamargos
Continued Contributor
Continued Contributor

Hi @patolattari,

 

If your visual just has those 3 columns you can use this code:

 

_Last Score =
VAR maxDate = CALCULATE(LASTDATE(Table1[Date]); ALLEXCEPT(Table1; Table1[StudentID]))
RETURN
CALCULATE(DISTINCT(Table1[Score]); FILTER(ALL(Table1); Table1[Date] = maxDate))

 

I hope it helps you.

 

Ricardo

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.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.