Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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!
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] )
)
Thanks,
Xi Jin.
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
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 47 | |
| 35 | |
| 28 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 59 | |
| 58 | |
| 40 | |
| 22 | |
| 20 |