COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: vinu_rnr on 20 Sep 2018 06:16:38 AM

Title: Show top 10 in list but graph to consider all, both using same query
Post by: vinu_rnr on 20 Sep 2018 06:16:38 AM
HI All,

I might be expecting too much, but still thought of consulting the Gurus here.

A List and Graph are built using same query, would like to if we can show only top 10 in list but graph should consider all records.

Primarily needed in Cognos 10.2.1  but if it's possible in Cognos11 that is good to know too!

Thank you,
Title: Re: Show top 10 in list but graph to consider all, both using same query
Post by: dougp on 20 Sep 2018 01:04:43 PM
Almost.  Make a downstream query and implement the top-10 feature.  Use that for the list.  Works well in 10 and 11.
Title: Re: Show top 10 in list but graph to consider all, both using same query
Post by: Lynn on 26 Sep 2018 03:48:54 AM
I agree with dougp, although another option is to create a conditional style that you apply to list column body style property that specifies box type none (on advanced tab of conditional style dialog) for rank greater than 10.

This may not perform as well but it depends how many rows there are to be suppressed.
Title: Re: Show top 10 in list but graph to consider all, both using same query
Post by: Invisi on 30 Oct 2018 09:59:11 AM
You're asking the opposite of what Cognos implemented. For (bar) charts there is an option for a top-n of values. A list misses that as far as I know. I think the reason behind this is quite logical. A list of various length is less bothersome than a bar chart with a varying amount of bars.

What I used to do for a top-n feature for lists is add a rank data item and filter on the value of that data item being n or less. In this case 10 or less.