Announcements
cancel
Showing results for
Did you mean:
Contributor III

## Help Calculating Rank

Hello Everyone,

I have attached a qvf file for an example data set to this problem.

To summarize, I have a data model that includes a set of Questions, Teachers, Teacher's Students, and Student Scores for each question.

I want to create a table that displays a specific teacher's rank based on their students' average score for each question.

Teacher 1 Rank Table:

Question Rank

 q1 Teacher 1 Rank q2 Teacher 1 Rank q3 Teacher 1 Rank

Teacher will not be a field in the table, and each question will only show up once

Thanks!

Jordan

Labels (3)

• ### straight table

1 Solution

Accepted Solutions
MVP

Are you looking for this?

Expression

`Only({<Teacher = {'t1'}>}Aggr(Rank(Sum(Score)), Question, Teacher))`
7 Replies
Partner - Master III

Maybe i am over simplifying the problem.

is below what you want

Contributor III
Author

Not quite, I want a table that that only has the list of questions and a rank for a specific teacher. For example, the following table would be created for Teacher 1

Question Rank

 q1 Teacher 1 Rank q2 Teacher 1 Rank q3 Teacher 1 Rank
Partner - Master III

change the sort order and use a filter. (see below)
is the data accurate?

Contributor III
Author

No, teacher field should not be in the table and I only want one row per question.

Partner - Master III
Ok. Your were not clear before
Try and Use firstsortedvalue
MVP

Are you looking for this?

Expression

`Only({<Teacher = {'t1'}>}Aggr(Rank(Sum(Score)), Question, Teacher))`
Partner - Master III

Assuming you want the top ranked teacher for each question. Use FirstSortedValue(Teacher,-Aggr(Sum(Score),Question,Teacher))