Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
New BI user.
From the sample below, I want to have a measure that results in the last Teacher’s Name that Jane Doe has a class with (final measure should result in Teacher Smith). How do I do that?
Student ID | Student Name | Teacher’s Name | Subject Period |
001 | Jane Doe | Teacher Smith | 7th |
001 | Jane Doe | Teacher Johnson | 5th |
001 | Jane Doe | Teacher Pearl | 1st |
Thanks.
Solved! Go to Solution.
Hi @SAP4026
please try
Last Teacher's Name =
MAXX (
TOPN (
1,
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Student ID] ) ),
'Table'[Subject Period]
),
'Table'[Teacher's Name]
)
Hi @SAP4026
please try
Last Teacher's Name =
MAXX (
TOPN (
1,
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Student ID] ) ),
'Table'[Subject Period]
),
'Table'[Teacher's Name]
)
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |