Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an app that contains a list of students with their test scores. When I select a single student, I would like to have a text box on the screen show me a calculation of the student's test score percentile. In other words, I would like to know what percentage of other student's test scores are equal than or lower to the selected student's test score.
The field that will be selected to identify the specific student is called [student_ID], and the test score field is called [test_score]. Unfortunately, I can't post a screen shot of the data due to privacy concerns.
Is this possible?
Hi, in the text box you can use an expresion like:
Count({<test_score={"<=$(=Max(test_score))"},student_ID>} student_ID) / Count({<student_ID>} student_ID)
Small tip. If you want your expression to exclude selected student from calculation of test score percentile, I recommend modifying the expression to be like this:
Count({<test_score = {"<=$(=test_score)"}, student_ID = E(student_ID) >} student_ID) / Count({<student_ID>} student_ID)
For example, let's say you have 100 students. You select a student that has a test score of 80. Let's say there are 59 other students that have a test score of 80 or less. The expression above, will return 59%.
Whereas, the expression that Rubenmarin suggested will return 60% because it will count the student you selected as well as the 59 students that have the score of 80 or less.
Not sure what the exact requirement you have, but I wanted to throw that out in case you'll need to exclude selected student from calculation of score percentiles.
Hi, in the text box you can use an expresion like:
Count({<test_score={"<=$(=Max(test_score))"},student_ID>} student_ID) / Count({<student_ID>} student_ID)
@rubenmarin Thank you so much!! This does exactly what I needed.
Small tip. If you want your expression to exclude selected student from calculation of test score percentile, I recommend modifying the expression to be like this:
Count({<test_score = {"<=$(=test_score)"}, student_ID = E(student_ID) >} student_ID) / Count({<student_ID>} student_ID)
For example, let's say you have 100 students. You select a student that has a test score of 80. Let's say there are 59 other students that have a test score of 80 or less. The expression above, will return 59%.
Whereas, the expression that Rubenmarin suggested will return 60% because it will count the student you selected as well as the 59 students that have the score of 80 or less.
Not sure what the exact requirement you have, but I wanted to throw that out in case you'll need to exclude selected student from calculation of score percentiles.
@howdash Great tip - Thanks for adding to the conversation.