Weighted Average based on Field identifier

bolwahnn

New Member
Joined
Apr 29, 2011
Messages
40
Hey Guys,

How would I create a measure of a weighted average based on 2 different field values? I know how to do this in excel using SUMPRODUCT, but I'm relatively new to DAX and dont know how to do the same calculation that I would normally use in Excel.

For the below, in excel, I would use the following formula in column F:
=SUMPRODUCT(--($B$2:$B$13=B2),--($C$2:$C$13=C2),$D$2:$D$13,$E$2:$E$13/SUMIFS($D$2:$D$13,$C$2:$C$13,"="&C2,$B$2:$B$13,"="&B2))


Date (A)Month (B)Language CTotal Calls (D)Average talk Time EAverage Talk Time Month (F)
1/1/20191English20200165.0
1/2/20191English30150165.0
1/3/20191English50160165.0
2/1/20192English20180181.4
2/2/20192English20170181.4
2/3/20192English30190181.4
1/1/20191Spanish5200224.0
1/2/20191Spanish10210224.0
1/3/20191Spanish10250224.0
2/1/20192Spanish15260241.7
2/2/20192Spanish10230241.7
2/3/20192Spanish5210241.7

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>


Any help would be much appreciated.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,212,932
Messages
6,110,748
Members
448,295
Latest member
Uzair Tahir Khan

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