COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gpollock on 06 Jul 2015 05:00:15 PM

Title: RESOLVED: Additional Filters without new query
Post by: gpollock on 06 Jul 2015 05:00:15 PM
Hey guys, I'm trying to find a way to only show the first five rows of a query in a list without having to make a new query.

I have a report studio report with a list.  The list has a store, 30+ metrics, and a rank for each group of metrics.  For example, a row will have Store, measuresA, rankA, measuresB, rankB....rankG.  The list is populated by a query called QueryStore.  Because there's so much going on in this query/list, I'm trying to keep everything simple so when it needs to be maintained down the road it doesn't confuse the next developer.

Now here's the kicker.  There is now a request to show in addition to the big list, smaller lists that show the top/bottom 5 stores by each rank.  The additional lists will be simple enough: just store, the relevant rank, and 1-2 metrics that help determine the rank.  In a simple report, I would make a sub-query of QueryStore, set a filter for rank{x}<=5, and move on.  But this report is so big, and there are so many ranks, that the report is going to be flooded behind-the-scenes if I do this for each rank.

What I'd like is to create a 2-3 column list that is still based on QueryStore, but only shows the first five rows.  Then I could have each list sorted by its relevant rank.  If that's not possible, I want to find a way to show all of these small lists without having to create seprate queries.

Thank you for your help.
Title: Re: Additional Filters without new query
Post by: Gyana on 08 Jul 2015 07:23:25 AM
In this case you can use style variable & hide the List body.
Title: Re: RESOLVED: Additional Filters without new query
Post by: gpollock on 08 Jul 2015 09:57:29 AM
Thanks Sekhar@22.  That did the trick.

For anyone else with this problem, here's what I did: