IBM Support

Retrieve a Random Sample of rows from a Report

Troubleshooting


Problem

Description:[ How to create filters and calculations that retrieve a random sample of rows from the report. Solution: In your Impromptu report, do the following: 1. To start, your report must have a column with numbers in it. This column will be referred to as NUMBERS. 2.Add a calculated column ( Name this column: RANDOM NUMBERS ) to the report with the following definition: Round - near ( Rand ( NUMBERS ) * X, 0 ). This column will create random number for each number in the NUMBERS column and round them to be whole numbers (due to the 0 at the end). The numbers will range from 1 - X, where X is the limit. 3.Add a calculated column ( Name this column: Rank of RANDOM NUMBERS ) with the following definition: rank ( RANDOM NUMBERS ) for report. This column will rank these random numbers from 1 - Y, where Y is the number of rows in the report. 4. Add a summary filter as follows: Rank of RANDOM NUMBERS <= Z. This will limit the report to be Z rows long. The Report will now return random rows of Data. Keywords:] random data, random sample, random rows

[{"Product":{"code":"SSTQPQ","label":"IBM Cognos Series 7 PowerPlay"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Impromptu","Platform":[{"code":"PF025","label":"Platform Independent"},{"code":"PF033","label":"Windows"}],"Version":"Impromptu 7.3","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Historical Number

1021686

Document Information

Modified date:
09 May 2025

UID

swg21350665