I am breaking out a dataset into products, then need to find the value that the top 5% and 2% are above. Sounds simple! I have used a descending sort, then sample top 5% records, then sample last record - which works great. However some of my products break out with very few records - and these bring back nothing. eg. one product brings back 3 records and the result brings back nothing, so top 5% would equate to 0.15 of a record. however with 30 records which would be 1.5 of a record brings back 2 records. So my question is does this tool round to the nearest whole record or something?
How can I get around this? Assuming the above is correct - could use an if function to split out if record number < 25 (for 2%) or 10 (for 5%) calc then just use the top record?