COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: RAJESH_COGNOS on 26 May 2009 03:29:13 PM

Title: First 5 Rows Only.
Post by: RAJESH_COGNOS on 26 May 2009 03:29:13 PM
How can I add a filter to limit my output to first 5 rows?
If I use rank([member]) to limit, since the default is Olympic ranking it is of no help.
Is there a way that I can use dense ranking so that my filter to limit the the first 5 rows will work as I expected.

Olympic     Dense
1        1
2        2
2        3
3        4
4        5
4        6
4        7
5        8
6        9
6            10

I am using rank to filter the first 10 rows .If anybody has anyother idea please post.

Thanks
Rajesh
Title: Re: First 5 Rows Only.
Post by: nimmyjis on 27 May 2009 03:22:12 AM
Hi,
Either you can use conditonal formatting.Use a conditional variable which has expression 'RowNumber()>=5'
apply conditional formatting in your report and hide them if this condition satisfies.
I hope this will work.
Or else you can use 'running-count(data item) and then can filter for this data item<=5
Title: Re: First 5 Rows Only.
Post by: RAJESH_COGNOS on 27 May 2009 04:26:25 PM
Thanks Dude...second one helps...