COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: KM on 25 Sep 2018 08:47:26 AM

Title: Show top 5 and aggregate rest all to 'Others'
Post by: KM on 25 Sep 2018 08:47:26 AM
Hi,

I need to display top 5 clients (based on revenue) and aggregate rest all clients to just a single row 'Others' 

 

C1 100

C2 150

C3 200

C4 250

C5 300

Others 5000

 

Please let know how I can achieve this.

 

Thank You!
Title: Re: Show top 5 and aggregate rest all to 'Others'
Post by: sdf on 25 Sep 2018 09:45:24 AM
Get to 5 :
if Relational source use Rank
if dimensional (cube) use TopCount

to get "other"
Total(all) - total(top5)
Title: Re: Show top 5 and aggregate rest all to 'Others'
Post by: hespora on 26 Sep 2018 04:55:48 AM
If on dimensional, there is a beautiful technique, outlined by Grandmaster Paul no less, to be found here: http://cognospaul.com/2017/03/06/quickie-top-5-top-4-others/
Title: Re: Show top 5 and aggregate rest all to 'Others'
Post by: dougp on 26 Sep 2018 01:09:19 PM
So, this is the same question you asked on stackoverflow?  See the answer there (http://"https://stackoverflow.com/questions/52499971/top-5-and-aggregate-rest-all-to-others-in-cognos-10-report-studio/52503134#52503134").
Title: Re: Show top 5 and aggregate rest all to 'Others'
Post by: Invisi on 30 Oct 2018 10:01:47 AM
I miss your visualization. If you will do it with a horizontal bar chart (the most obvious choice), then you can use the top-n option that the bar chart has.