Author Topic: How to filter for a random selection of 50% of the records?  (Read 35 times)

Offline pacificbeavs

  • Full Member
  • ***
  • Join Date: Jan 2018
  • Posts: 32
  • Forum Citizenship: +0/-0
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!

« Last Edit: 13 Feb 2019 03:05:05 pm by pacificbeavs »

 


       
Twittear