Summarize SUMX grand total as a grand average

gxm204

New Member
Joined
Nov 20, 2015
Messages
29
Hi, I have the following workbook to get weighted student grade averages, which I am doing with `SUMX()` in DAX (From what I understand, this is akin to `SUMPRODUCT()` in Power Pivot):

Excel Formula:
=SUMX(grades, [grade] * RELATED(weights[weight]))

It's working pretty much as I want, except for the Grand Total which is naturally summing up all of the weighted averages, rather than taking an average grade which makes more sense.

I don't see any easy way to adjust this, am I missing something? Thanks so much for your time and consideration.
 

Attachments

  • 2023-02-08_09-49-25.png
    2023-02-08_09-49-25.png
    33.2 KB · Views: 18

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You could add a new measure using:

Code:
=if(ISCROSSFILTERED([student_id]),[Semester grade],AVERAGEX(VALUES(grades[student_id]),[Semester grade]))

then use that in the pivot instead of your existing measure.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,158
Messages
6,170,423
Members
452,325
Latest member
BlahQz

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