on 05-27-2011 10:53 AM
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
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.