COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Anna711 on 12 Aug 2013 01:08:28 AM

Title: Unique rank
Post by: Anna711 on 12 Aug 2013 01:08:28 AM
Hello,

I have an issue with the "rank" function. I have a list chart that should display top 10 countries by sales. I created a new data item "Rank": rank(total([SQL1].[SALES])) and sorted the table by "Sales" desc. The problem I encounter is that when there are a few countries with the same sales amount, I receive more than 10 rows (cause the functions gives them the same rank). How can I have a unique rank?

Thanks!
Title: Re: Unique rank
Post by: Satheesh on 12 Aug 2013 01:40:53 AM

Hi,


Use Running-Count() function and filter on that Data Item....
Use Filter [DataItem1] <=10


DataItem1

running-count(sales)



Title: Re: Unique rank
Post by: Anna711 on 12 Aug 2013 02:14:05 AM
Thanks for your reply. I tried running-count and for some reason now it only shows 1 row...
Title: Re: Unique rank
Post by: Satheesh on 12 Aug 2013 02:21:10 AM
Hi Anna,
Select running-count Filter
In Properties ( Right Side) ---> Under General ---> Application change to After Auto Aggregation..




You can get





Title: Re: Unique rank
Post by: Anna711 on 12 Aug 2013 02:28:32 AM
Thanks a lot! It seems to work now.
Title: Re: Unique rank
Post by: Satheesh on 12 Aug 2013 02:30:37 AM
 Your are Welcome  ;)