Weighted Average (Dynamic Range)

garypea123

Board Regular
Joined
Mar 16, 2020
Messages
223
Office Version
  1. 365
Platform
  1. Windows
Good Afternoon,

I do not have XLSBB available on computer so I cannot upload this.

I have simplified by raw data below but please see below request.

Calulation of RSP = F divided by E

My issue is that sometimes in a promo the RSP will be lower and so I need to create a weighted average when this occurs.

The weighted average should be based on the SKU and Week.

In the below example the calculation will weight average SKU 1 with cust202219 (SUM of F divided by SUM of E) and then weight average SKU 1 with cust202220 (SUM of F divided by SUM of E).

I can do this manual by doing it for each individual week, but there must be a smarter way of doing this.

Kind Regards


Weighted Average.PNG
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try

I2 copied down
=SUMIFS($F$3:$F$16,$B$3:$B$16,B3,C$3:C$16,C3)/SUMIFS($E$3:$E$16,$B$3:$B$16,B3,C$3:C$16,C3)

M.
 
Upvote 0
Solution
Perfect - I understand that fully.

Mine was a similar, but was using a SUMIF. The SUMIFS I need to keep remembering :)

Thank you very much
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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