How to calculated weighted percentiles (w/o duplication of entries)

debru

New Member
Joined
Mar 17, 2016
Messages
1
Dear all, I've been looking for days now and could not find a conclusive solution so I'm turning to you in hope for some valuable input.

I have a large sales data set (~62,000 entries) and would like to analyse the distribution of prices weighted by revenue. Objective is to create box plots which show minimum, lower percentile, median, upper percentile and the maximum. The data set looks something like this (sorry for the Format):
Product Quarter Price Units Revenue
Product A Q1 1.200 20 24.000
Product A Q1 1.250 10 12.500
Product A Q1 1.280 50 64.000
Product A Q2 1.280 15 19.200
Product A Q2 1.280 60 76.800
Product B Q1 1.280 20 25.600
Product B Q1 1.300 12 15.600
Product B Q1 1.320 10 13.200
Product B Q2 1.100 80 88.000
Product B Q2 1.250 20 25.000
Product B Q2 1.200 12 14.400
Product B Q2 1.000 80 80.000
Product B Q2 1.500 5 7.500

(Columns A to E and Lines 1 to 15)

In Cell A18 the selection of Product is made, e.g. Product A
In Cell B18 the selection of Quarter is made, e.g. Q1

With this array formula I sucessfully calculate the median of the unweighted price:
{=PERCENTILE.INC(IF($A$2:$A$15=$A$18;IF($B$2:$B$15=$B$18;$C$2:$C$15));0,5)}

Now I would like to learn how to calculate the percentiles of price weighted with the revenue :)

Help is highly appreciated!

Many thanks

Denis
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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