Make ranking in a report

A

ACE Connection

I have made a report that prints out athletes in ascending order with their
score. In Excel it is quite easy to make a column with ranking that also
takes into account athletes with same score will have the same rank, and the
next in rank will be numbered two lower. For example: A have 20
points=number one, B have 20 points=number one, C have 19 points=number
three.



Does anyone have a solution to this?



Thank you all in advance..



Espen
 
M

Marshall Barton

ACE said:
I have made a report that prints out athletes in ascending order with their
score. In Excel it is quite easy to make a column with ranking that also
takes into account athletes with same score will have the same rank, and the
next in rank will be numbered two lower. For example: A have 20
points=number one, B have 20 points=number one, C have 19 points=number
three.

Typically this is done in the report's record source query
by using a subquery:

SELECT *,
(SELECT Count(*) + 1 AS Rank
FROM reportquery AS T
WHERE T.score < A.score)
FROM reportquery AS A
 
D

Duane Hookom

You can create an expression in the query:
Rank: (Select Count(*) From tblYourTable t where T.Points >
tblYourTable.Points) +1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top