Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS-Access Multiple Rank Order

Status
Not open for further replies.
Aug 28, 2008
1
US
I'm trying to build a table that has multiple rank orders. I have devised a plan to do a single rank order:

Rank: (Select Count([_Summary Data].EIN) From [_Summary Data] AS Duplicate WHERE Duplicate.[JUL POINTS] > [_Summary Data].[JUL POINTS];)+1

Which can be embedded directly into a query. However, I want to try and build this multiple times. Here is a sample data set:

Pts Region
1234 1
1351 2
2042 1
2582 2

And the ideal output I would like to get would be:

Pts Region OverallRank RegionRank
1234 1 4 2
1351 2 3 2
2042 1 2 1
2582 2 1 1

Any help anyone can provide would be greatly appreciated. Thanks!
 
Provided your posted overall rank works:
RegionRank: (Select Count(EIN) From [_Summary Data] AS Duplicate WHERE Duplicate.[JUL POINTS] > [_Summary Data].[JUL POINTS] AND Duplicate.Region = [_Summary Data].Region)+1



Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top