COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Londa on 10 Nov 2016 08:24:22 AM

Title: Reverse the Rank in 10.2
Post by: Londa on 10 Nov 2016 08:24:22 AM
I am using Cognos 10.2. I have a list and need to rank having the "worst" number show up as Rank 1 (reverse the rank order). What is the best way to do this?

Thank you,
Title: Re: Reverse the Rank in 10.2
Post by: Lynn on 10 Nov 2016 08:39:19 AM
Quote from: Londa on 10 Nov 2016 08:24:22 AM
I am using Cognos 10.2. I have a list and need to rank having the "worst" number show up as Rank 1 (reverse the rank order). What is the best way to do this?

Thank you,

Is this a relational or a dimensional package?

If it is relational, you can use the rank function and specify ASC rather than DESC. It assumes DESC by default so you need to change it if you want to rank the other way.


rank ( [Your Number] ASC )


If it is dimensional, then you'd want to use the bottomCount Function. If you have a set on rows in a crosstab, for example, you can edit that set and use the little wizard to define what you need.

As a side note, you've posted in the Cognos Analytics section when you should have posted in the Cognos 10 section. A moderator may move the post for you.
Title: Re: Reverse the Rank in 10.2
Post by: Londa on 10 Nov 2016 08:45:35 AM
Thank you! Thank you! Thank you!

Works like a charm!