cancel
Showing results for 
Search instead for 
Did you mean: 

Random 10% Of Result of query O/P must display.

Former Member
0 Kudos

Hi experts,

I am using BW 3.5.

I have a requirement to deliver a report to Quality dept. for quality testing of device properly installed at site. the requrement is query must fetch 10% data only from the all records in RANDOM manner.where i have to apply filter conditin if any logic at query level.

Plz share

Regards

satish

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member211907
Contributor
0 Kudos

The most straightforward approach would be to bring all records into Excel and use Excel's Random Number generator program to then 'choose' which row should be displayed.

A more BW specific approach would be to create an ODS from the initial query results and then use an exit to assign random numbers to a new key figure in the records. Then use a condition to filter out all but x% of the random numbers (a number between 0 and 1, for example).

Former Member
0 Kudos

i have down loaded excel down loaded Random Generator Excel but don't know how to apply 10% random filter on result set . have any 1used it up.

well ,is there any other options as vb macro code over excel result area .

plz reply asap

regards

former_member211907
Contributor
0 Kudos

To select roughly 10% of a large population of values using Excel fucntions, use this (In Excel)

=IF(RAND()*100>=90,1,0):

The only problem is that it will only pick a random number generated 10%. you could also use statistical functions to determine which values cover 10% of the choices. Also the choices will change every time your Excel spreadsheet is calculated, which, if auto calculation is turned on, will be every time you enter any keystroke into Excel. So tread carefully.