COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: wshen on 03 Nov 2006 03:53:24 PM

Title: Dynamically display top 10 then the rest in a bucket on a Pie Chart
Post by: wshen on 03 Nov 2006 03:53:24 PM
Hi, folks.  I am trying to accomplish a Pie Chart graph in ReportNet.  Let's say I have 50 states and each state has a dollar amount.  The Pie Chart report should display the top 10 states based on the descending sort on dollar amount and then put the rest 40 states in a Others bucket.  How to do it? 

Thank in advance!
Title: Re: Dynamically display top 10 then the rest in a bucket on a Pie Chart
Post by: almeids on 07 Nov 2006 02:13:16 PM
(I'm assuming you already know how to do "top n" - if not post back and I'll give more details)

Instead of a filter like "rank<11", add a calculated data item to your query which contains something like:

if (Rank<11) then ([your_state_column]) else ('Others')

and use this calculated item instead of [your_state_column]

Steve
Title: Re: Dynamically display top 10 then the rest in a bucket on a Pie Chart
Post by: fedix on 21 Feb 2007 09:29:32 AM
can you explain how to do "top n"?

Many thanks
Fedix