COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: actcognosuser on 02 Feb 2010 02:08:02 PM

Title: Help needed with row count!!!
Post by: actcognosuser on 02 Feb 2010 02:08:02 PM
Hi All,
         Is there a way to limit the number of rows based on a date.i have a student records database.I need to display a random of 20 rows for each date??

Thanks in advance!
Title: Re: Help needed with row count!!!
Post by: rcaesar on 02 Feb 2010 10:00:41 PM
Off the bat it seems, I would first need to group by the date, and then use the Count() within each group.
Title: Re: Help needed with row count!!!
Post by: paddhu on 02 Feb 2010 11:01:49 PM
I don't remember exactly, but I think that the function top-count() must resolve your problem. You can refer its syntax and usage in the user guide. Then try and let us know if it works for your requirement.
Title: Re: Help needed with row count!!!
Post by: saps on 03 Feb 2010 07:54:30 AM
After grouping,when I try to count .It is counting one of the columns which is a measure..Like student marks .

my columns are | as of date |student name|marks in science|math|remarks

For every as of date i need to display 20 random rows of student statistics..i.e name,marks