COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: pacificbeavs on 11 Feb 2019 07:09:00 PM

Title: How to filter for a random selection of 50% of the records?
Post by: pacificbeavs on 11 Feb 2019 07:09:00 PM
Cognos 11

I am trying to sample 50% of the records in my list report randomly, i.e. if my list returns 100 records then I would like to display 50 random records.  I have tried using combinations of Rand, Running-Count, and Newid, and I've yet to get one to work correctly. I am able to pull 50% of the records, however the same records display every time I run the report.  I had my list sorted on NewId, and another time on the Rand column, however neither seemed to enable me to pull random results.

Do you have any thoughts? Thanks!