Intra Quartile average with a conditional

Dandada2602

New Member
Joined
Nov 22, 2018
Messages
13
I need to calculate the average transaction time of 25% longest transactions (in minutes) for each day. It may seems a calculation with the 3rd quartile but I don't know how or if its possible. This is an extract of the sample data:

1603060808183.png


Thanks in advance for your help,

Regards,
Dandada26
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
@Dandada26.... Please confirm that you want the average of the largest 25% (above 3rd quartile), as stated in the body of your posting, not the average of the middle 50% (between 2nd and 3rd quartiles), which is the intraquartile (sic) as stated in the posting subject.

Assuming that is correct, try the following.

Book1
ABCDE
1
210/5/20200:18:41
310/5/20200:48:26
410/5/20200:35:26
510/5/20200:16:20
610/5/20200:26:40Q3 Average
710/5/20200:15:0610/5/20200:52:42.667
810/5/20200:37:0010/6/20201:09:17.250
910/5/20200:21:21
1010/5/20201:00:16
1110/5/20200:49:26
1210/6/20201:35:02
1310/6/20200:24:05
1410/6/20200:58:36
1510/6/20200:14:43
1610/6/20201:01:18
1710/6/20200:50:13
1810/6/20201:02:13
1910/6/20200:49:52
2010/6/20200:11:26
2110/6/20200:15:47
2210/6/20200:54:06
2310/6/20200:16:18
2410/6/20200:29:22
2510/6/20200:30:54
2610/6/20200:30:23
Sheet1
Rich (BB code):
Formulas:
E7: { =AVERAGEIFS($B$2:$B$26, $A$2:$A$26, D7, $B$2:$B$26, ">=" & QUARTILE(IF($A$2:$A$26=D7, $B$2:$B$26), 3)) }
E8: { =AVERAGEIFS($B$2:$B$26, $A$2:$A$26, D8, $B$2:$B$26, ">=" & QUARTILE(IF($A$2:$A$26=D8, $B$2:$B$26), 3)) }
The formuals are array-entered. Omit the curly braces, and press ctrl+shift+Enter instead of just Enter.

Format E7:E8 as Custom [h]:mm:ss.000 if you want millisecond precision.

PS.... I just noticed that you want the results "in minutes". In that case, format E7:E8 as Number and append *1440 at the end of the formula (still array-entered). For example:


{ =AVERAGEIFS($B$2:$B$26, $A$2:$A$26, D7, $B$2:$B$26, ">=" & QUARTILE(IF($A$2:$A$26=D7, $B$2:$B$26), 3))*1440 }
 
Last edited:
Upvote 0
@Dandada26.... Please confirm that you want the average of the largest 25% (above 3rd quartile), as stated in the body of your posting, not the average of the middle 50% (between 2nd and 3rd quartiles), which is the intraquartile (sic) as stated in the posting subject.

Assuming that is correct, try the following.

Book1
ABCDE
1
210/5/20200:18:41
310/5/20200:48:26
410/5/20200:35:26
510/5/20200:16:20
610/5/20200:26:40Q3 Average
710/5/20200:15:0610/5/20200:52:42.667
810/5/20200:37:0010/6/20201:09:17.250
910/5/20200:21:21
1010/5/20201:00:16
1110/5/20200:49:26
1210/6/20201:35:02
1310/6/20200:24:05
1410/6/20200:58:36
1510/6/20200:14:43
1610/6/20201:01:18
1710/6/20200:50:13
1810/6/20201:02:13
1910/6/20200:49:52
2010/6/20200:11:26
2110/6/20200:15:47
2210/6/20200:54:06
2310/6/20200:16:18
2410/6/20200:29:22
2510/6/20200:30:54
2610/6/20200:30:23
Sheet1
Rich (BB code):
Formulas:
E7: { =AVERAGEIFS($B$2:$B$26, $A$2:$A$26, D7, $B$2:$B$26, ">=" & QUARTILE(IF($A$2:$A$26=D7, $B$2:$B$26), 3)) }
E8: { =AVERAGEIFS($B$2:$B$26, $A$2:$A$26, D8, $B$2:$B$26, ">=" & QUARTILE(IF($A$2:$A$26=D8, $B$2:$B$26), 3)) }
The formuals are array-entered. Omit the curly braces, and press ctrl+shift+Enter instead of just Enter.

Format E7:E8 as Custom [h]:mm:ss.000 if you want millisecond precision.

PS.... I just noticed that you want the results "in minutes". In that case, format E7:E8 as Number and append *1440 at the end of the formula (still array-entered). For example:


{ =AVERAGEIFS($B$2:$B$26, $A$2:$A$26, D7, $B$2:$B$26, ">=" & QUARTILE(IF($A$2:$A$26=D7, $B$2:$B$26), 3))*1440 }
You nailed it!! I wanted the average above 3rd quartile.

Thanks joeu2004!
 
Last edited by a moderator:
Upvote 0
You nailed it!! I wanted the average above 3rd quartile. Thanks joeu2004!

You're welcome. And just for the record, the intraquartile (middle 50%) is between the __1st__ and 3rd quartiles, not the 2nd (sic) and 3rd quartiles, as I had written. My bad!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,249
Members
452,623
Latest member
Techenthusiast

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