90th percentile with conditions

jodily

New Member
Joined
Feb 23, 2018
Messages
5
Hi,
I need to find out the 90th percentile of a set of times but with conditions. I have rows with data that need to be considered in the percentile. The first column has the incident numbers (there are duplicate values because there are different staff showing up at different times for the same incident). The second column has the times the staff showed up and the third column has the amount of staff that showed up each time. I only want to consider the times in the percentile that incorporate the first 12 staff, this may just be the first 3 times if 4 staff show up each time. However I am not sure how to create the formula that will find the times of the first 12 staff members and ignore the other times of any staff over 12. I need a formula that will copy down because I have data for about 300 different incidents to look at. Hopefully there is a way to do this.

Incident Response times # of staff
HF16-2 0:11:36 4
HF16-2 0:05:48 4
HF16-2 0:06:56 2
HF16-2 0:03:20 4
HF16-2 0:02:19 4
HF16-2 0:08:40 1
HF16-3 0:12:05 4
HF16-3 0:02:03 4
HF16-3 0:08:45 1
HF16-3 0:03:54 4
HF16-3 0:07:40 2
HF16-3 0:05:11 4
HF16-4 0:58:26 0
HF16-4 0:05:40 0
HF16-4 0:06:04 0
HF16-5 0:06:17 2
HF16-5 0:04:50 2

Thank you.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
So for your example, you want the 90th percentile of these two time?

Inc
Time
Peeps
HF16-2
0:11:36​
4​
HF16-2
0:05:48​
4​
HF16-2
0:06:56​
2​
HF16-2
0:03:20​
4​
0:03:20​
HF16-2
0:02:19​
4​
HF16-2
0:08:40​
1​
HF16-3
0:12:05​
4​
HF16-3
0:02:03​
4​
HF16-3
0:08:45​
1​
HF16-3
0:03:54​
4​
0:03:54​
HF16-3
0:07:40​
2​
HF16-3
0:05:11​
4​
HF16-4
0:58:26​
0​
HF16-4
0:05:40​
0​
HF16-4
0:06:04​
0​
HF16-5
0:06:17​
2​
HF16-5
0:04:50​
2​
 
Upvote 0
No, sorry. I need to calculate the 90th for each incident separately, so HF16-2 separately from HF16-3 and so forth. But within HF16-2 I need to just isolate the times for the first 12 people. Visually looking at it 4 people showed up at 2:19, 4 at 3:20 and 4 at 5:48, so those are the first 12 people and I just want the 90th for those first 3 times. So for each incident I need to somehow pull out the times of the first 12 people. I can certainly do it if I look at each incident separately but I have over 300 incidents to look at. Not sure if there is a way to do this with a formula.






So for your example, you want the 90th percentile of these two time?

Inc
Time
Peeps
HF16-2
0:11:36​
4​
HF16-2
0:05:48​
4​
HF16-2
0:06:56​
2​
HF16-2
0:03:20​
4​
0:03:20​
HF16-2
0:02:19​
4​
HF16-2
0:08:40​
1​
HF16-3
0:12:05​
4​
HF16-3
0:02:03​
4​
HF16-3
0:08:45​
1​
HF16-3
0:03:54​
4​
0:03:54​
HF16-3
0:07:40​
2​
HF16-3
0:05:11​
4​
HF16-4
0:58:26​
0​
HF16-4
0:05:40​
0​
HF16-4
0:06:04​
0​
HF16-5
0:06:17​
2​
HF16-5
0:04:50​
2​

<tbody>
</tbody>
 
Upvote 0
Sort by Incident and Time ascending, then

A​
B​
C​
D​
E​
1​
Incident
Time
Peeps
2​
HF16-2
0:02:19​
4​
D2 and down: {=IF((SUMIF(A$1:A2, A2, C$1:C2) >= 12) * (SUMIF(A$1:A1, A2, D$1:D1) = 0), PERCENTILE(IF(A$1:A2 = A2, B$1:B2), 90%), "")}
3​
HF16-2
0:03:20​
4​
4​
HF16-2
0:05:48​
4​
0:05:18​
5​
HF16-2
0:06:56​
2​
6​
HF16-2
0:08:40​
1​
7​
HF16-2
0:11:36​
4​
8​
HF16-3
0:02:03​
4​
9​
HF16-3
0:03:54​
4​
10​
HF16-3
0:05:11​
4​
0:04:56​
11​
HF16-3
0:07:40​
2​
12​
HF16-3
0:08:45​
1​
13​
HF16-3
0:12:05​
4​
14​
HF16-4
0:05:40​
0​
15​
HF16-4
0:06:04​
0​
16​
HF16-4
0:58:26​
0​
17​
HF16-5
0:04:50​
2​
18​
HF16-5
0:06:17​
2​
 
Upvote 0

Forum statistics

Threads
1,214,854
Messages
6,121,941
Members
449,056
Latest member
denissimo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top