The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello.
I have a table with students' exams including score, exam number, and whether the exam was proctored or not.
Name | Exam score | Exam number | Proctored |
Kathy | 90 | 1 | No |
Kathy | 86 | 2 | Yes |
Kathy | 70 | 3 | Yes |
Ben | 79 | 1 | Yes |
Ben | 94 | 2 | No |
Steve | 20 | 1 | No |
Steve | 35 | 2 | Yes |
Steve | 60 | 3 | No |
Steve | 81 | 4 | Yes |
I would like to produce tables that list the students together with the score on the first proctored exam:
Name | First proctored exam score |
Kathy | 86 |
Ben | 79 |
Steve | 35 |
I've tried a bunch of things and can't get them to work.
Any help would be greatly appretiated!
Solved! Go to Solution.
@lyengulalp
I hope your exam numbers are in sequence order otherwise you will have to add an index column in Powre Query and use it instead. Try this meaure:
First proctored exam score =
VAR __ExNo =
MINX(
FILTER(
Table1,
Table1[Proctored] = "Yes"
),
Table1[Exam number]
)
VAR __Result =
CALCULATE(
MAX(Table1[Exam score]),
Table1[Exam number] = __ExNo
)
RETURN
IF(
ISINSCOPE( Table1[Name] ),
__Result
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@lyengulalp
I hope your exam numbers are in sequence order otherwise you will have to add an index column in Powre Query and use it instead. Try this meaure:
First proctored exam score =
VAR __ExNo =
MINX(
FILTER(
Table1,
Table1[Proctored] = "Yes"
),
Table1[Exam number]
)
VAR __Result =
CALCULATE(
MAX(Table1[Exam score]),
Table1[Exam number] = __ExNo
)
RETURN
IF(
ISINSCOPE( Table1[Name] ),
__Result
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
12 | |
9 | |
5 |