COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: hiranb on 06 Mar 2009 10:33:20 AM

Title: rows count for report
Post by: hiranb on 06 Mar 2009 10:33:20 AM
Hi

   I have to get prefiltered count of rows for report. But when I prompt on certain value, the row counts are not what I expected. I have used prefilter in count function. Can any one provide suggestions? Thanks.
Hiran
Title: Re: rows count for report
Post by: Gollapudi on 09 Mar 2009 04:21:22 AM
Hi,

There are 2 ways you can do, one is you can Rank a Measure and can have a prefilter on that rank.
other is you can create a running-count and can have a prefilter on that Data Item.

Have a look at the attached report specification for the Running-count option.

Thanks,
Gollapudi.
Title: Re: rows count for report
Post by: hiranb on 09 Mar 2009 09:24:43 AM
I have to get for eg: prefiltered values count(distinct[salesperson ID] for region, year) and count(distinct[salesperson ID] for report) and place them in list page footer. running count is not giving me the value that I need. Thanks,Hiran
Title: Re: rows count for report
Post by: bobj on 10 Mar 2009 06:08:26 AM
Hi,

You have to be careful with ranking as I believe that if 2 entries have the same value, they get the same rank. I've seen results ranked like; 1,2,3,3,3,6,6,6,9,10...
Thus, if there are two entries that rank 5th (they have the same value), you would end up with 6 items in the result set.
Strange but true...
The running count and filter should work.
Double check your grouping which might be causing the issue.

Thanks,
Bobj BI.