COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: wyconian on 14 May 2008 10:33:36 AM

Title: Filter on a rank column
Post by: wyconian on 14 May 2008 10:33:36 AM
Hi

I'm feeling a bit daft that I have to ask this question  but it's driving me mad. 

My users are develoiping list reports from a relational package and ranking on measure column, which works great.  They then want to just see the top n rows based on the rank.  We've tried using a filter to say something like [rank] <=5 but cognos (8.2) seems to be ignoring the filter and still returns all the data.

Can any body help?
Title: Re: Filter on a rank column
Post by: rockytopmark on 14 May 2008 12:50:27 PM
Try changing the Filter's setting to be AFTER aggregation, rather than before aggregation.

If this still doesn't do it, create a Reference Query from which to base your report, with the original query as its source, and put the Rank <= 5 filter in the Reference Query, instead.
Title: Re: Filter on a rank column
Post by: wyconian on 15 May 2008 03:50:22 AM
Thanks for the help.  I couldn't get the suggestions to work but added a running count to the report and managed to filter on that.

Thanks again
Title: Re: Filter on a rank column
Post by: dannyboy on 18 May 2008 06:40:39 PM
Guys, Im wondering if you can help me out too - my problem is similar I think. I have a set of accounts where I am sorting by the rank. I only want to show the top 10 accounts and normally, a simple filter would help me out here. But on my report, I have a number of different revenues (week, month, year) but think I can only filter on one?

The problem with that is that it will only return data for that one revenue column, all the other timeframes come up as 0 which is logical I suppose. But is there a way around this? To sort and filter on one but show them all?

I hope this message/request makes some semblance of sense,

Thanks in advance for your help,