Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Ranking in cross tab reports

Hi All,

I am working on a cross tab crystal report and need to display ranks by groups. I have attached a screenshot of the report for convenience (i have grayed out the data). All the columns displayed in the image are developed except for the rank column. Rank column is dependent on the % column before it (i.e. cloumn 8). Also, I was able to sort column 8. I have added a sample rank column and need the ranks accordingly by group.

Thanks in advance!

tmp.jpg (165992 B)
Former Member
Former Member replied

I was able to come to a solution. Wanted to share if it could be of any help to others. Its not the best solution for sure but is effective.

if

NthLargest (1,Field,Group_name) = Field

then 1

else if NthLargest (2,Field,Group_name) = Field

then 2

else if NthLargest (3,Field,Group_name) = Field

then 3

and so on....

Here "Field" is the the criteria which is used to rank. The criteria in my case was a summarized field.

And "Group_name" is the level at which the cross tab is grouped.

Since it was highly unlikely in my case that any group will have more than 20 items so I can rank stuff without making the formula terribly big. But NthLargest has a limitation which will not work for more than 100 items.

Thanks!

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question