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: 13

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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