Weighted average DAX help...

Matty

Well-known Member
Joined
Feb 17, 2007
Messages
3,717
Hi Team,

Looking to replicate the following in DAX...

Here's an example table in Excel to paint the picture:

Key FigureUOMMonth 1Month 2Month 3Month 4Month 5Month 6Month 7Month 8Month 9Month 10Month 11Month 12Average
WeightPUMs4,011,6924,186,3013,610,2943,413,2253,594,8393,684,3664,107,3663,765,7393,818,0633,691,5723,725,8253,204,5283,734,484
ValueDays32.032.829.127.326.827.623.621.621.022.831.329.327.110

<tbody>
</tbody>

I would like to calculate the weighted average value seen in cell O3, which was achieved in Excel using the following:

Code:
=AVERAGE(C3:N3*C2:N2)/AVERAGE(C2:N2)

Array entered.

Hope someone can assist. I've been playing around for a while and can't quite get it.

Thanks,

Matty
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Usually weighted averages look like:

Code:
WAvg:=
DIVIDE (
    SUMX (
        VALUES ( Date[Months] )
        CALCULATE ( SUM ( Data[Value] ) * SUM ( Data [Weighting] ) )
    ),
    SUM ( Data[Weighting] )
)
 
Last edited:
Upvote 0
Hi Gaz,

Thanks for that. I managed to get something to work based on this.

Cheers,

Matty
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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