COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: MikeLanglois on 05 Dec 2017 04:36:21 AM

Title: Random Sample From Report
Post by: MikeLanglois on 05 Dec 2017 04:36:21 AM
Hi all,

I have a client who has asked for a dataset of about 800k rows of data from between two date ranges, however they only need a sample of the data from between the dates.

Instead of providing them with all the data and they randomly choose, I would like to run out a report that has a random sample for them each time. Is this possible?

I have tried looking into using SQL in the report using the NEWID() function, but it doesn't seem to work.

Anyone know a way to do it?
Title: Re: Random Sample From Report
Post by: New_Guy on 05 Dec 2017 08:56:24 AM
Hi,
If you have access to sql in reportstudio you can right a sql script to limit the rownumber with a prompt and user can enter the number of rows that they want to see in the report.
Another option is to use running-count of a data item in the filter and hardcode it or feed it from a prompt.
Good luck
New guy