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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ranking ties

Status
Not open for further replies.

Shab

Programmer
Oct 9, 2001
60
US
The Rank function specifies an optional 3rd parameter for tied ranking. If you specify this parameter, the ranking ignores the sort order of the set (even if you sorted it before) and it sorts the set in descending order based on the third parameter value. Ties get the same rank but the next one skips 1 number. For example you get 1, 2, 2 and 4.

Here are two questions:

Can you use this method and have the set sorted in descending order based on the values of the third parameter?

Is there a way to turn off the skipping of the numbers in ranking so that you get 1,2,2,3?

Thanks,
 
I found the answer to one of the questions I had. In order to get ranking with ties to sort the set in Ascending order, all you have to do is to specify the negative of the third paramter:

For example Rank( Deimension.Currentmember,
YourSet,
- [Measures].[Sales])
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top