Ranking in cross tab reports
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!
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.
NthLargest (1,Field,Group_name) = Field
else if NthLargest (2,Field,Group_name) = Field
else if NthLargest (3,Field,Group_name) = Field
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.