Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
milonsarker
Regular Visitor

Weighted Average at Row Level in Power BI Matrix Visual

Trying to develop a Power BI matrix visual which will show raw data in row level. I was able to show row level data by adding the Ranked column to the rows section of visual. Then in the total section, I need a custom calculation. Weighted Average Stipend is needed.

The formula is :

Weighted Stipend Average = SUM(Stipend * Number of Assistant)/SUM(Number of Assistant)

Here,

Stipend means various stipend like Teaching, Research, Graduate etc

Number of Assistant means number of teaching assistant, research assistant, graduate assistant etc

I tried using measure but I couldn't add measure in row level for every sub-category. Here is the table structure:

Here is the visual set up in Power BI:

Screenshot 2024-11-15 091656.png

 

Screenshot 2024-11-15 092446.png

 

Sample Data: 

DATA_TYPE_LABELCIP_6RankedTeaching_StipendTeaching_NumResearch_StipendResearch_Num
Doctorate Adjusted Ranked Salaries'01.00001541033350511241
Doctorate Adjusted Ranked Salaries'01.0000243147284342231
Doctorate Adjusted Ranked Salaries'01.000034242084301539
Doctorate Adjusted Ranked Salaries'01.0000442342240583219
Doctorate Adjusted Ranked Salaries'01.000054188153434694
Doctorate Adjusted Ranked Salaries'01.000063548643366035
Doctorate Adjusted Ranked Salaries'01.0000734885333307951
Doctorate Adjusted Ranked Salaries'01.000083432323304196
Doctorate Adjusted Ranked Salaries'01.0000933008632460100
Doctorate Adjusted Ranked Salaries'01.00001031741832313107
Doctorate Adjusted Ranked Salaries'01.00001131060313147241
Doctorate Adjusted Ranked Salaries'01.00001230871931293241
Doctorate Adjusted Ranked Salaries'01.00001329555831285165
Doctorate Adjusted Ranked Salaries'01.0000142861392914769
Doctorate Adjusted Ranked Salaries'01.0000152855342812749
Doctorate Adjusted Ranked Salaries'01.0000162831514277098
Doctorate Adjusted Ranked Salaries'01.00001726891427377110
Doctorate Adjusted Ranked Salaries'01.000018249039264264
Doctorate Adjusted Ranked Salaries'01.0000192471472629459
Doctorate Adjusted Ranked Salaries'01.0000202220832595413
Doctorate Adjusted Ranked Salaries'01.00002121023724877141
Doctorate Adjusted Ranked Salaries'01.000022175891239933
Doctorate Adjusted Ranked Salaries'01.0000231641182344149
Doctorate Adjusted Ranked Salaries'01.00002416190152197066
Doctorate Adjusted Ranked Salaries'01.000025  2050062
Doctorate Adjusted Ranked Salaries'01.000026  2045427
Doctorate Adjusted Ranked Salaries'01.000027  1705366
Doctorate Adjusted Ranked Salaries'01.000028  1672224
Expected Summarised Value  34093.8527125832666.458822210
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @milonsarker 

 

You can try the following methods.

Average of Teaching_Stipend = DIVIDE(SUMX('Table',[Teaching_Stipend]*[Teaching_Num]),SUM('Table'[Teaching_Num]))
Average of Research_Stipend = DIVIDE(SUMX('Table',[Research_Stipend]*[Research_Num]),SUM('Table'[Research_Num]))

vzhangtinmsft_0-1731998421441.png

Is this the result you expected?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi, @milonsarker 

 

You can try the following methods.

Average of Teaching_Stipend = DIVIDE(SUMX('Table',[Teaching_Stipend]*[Teaching_Num]),SUM('Table'[Teaching_Num]))
Average of Research_Stipend = DIVIDE(SUMX('Table',[Research_Stipend]*[Research_Num]),SUM('Table'[Research_Num]))

vzhangtinmsft_0-1731998421441.png

Is this the result you expected?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi, @milonsarker 

 

Can you provide example data or sample files? And what you expect the output to be. There is sensitive data that can be removed in advance. How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I've added the sample data. Also, original post already has the equation for weighted average stipend. 

danextian
Super User
Super User

Hi @milonsarker 

Please post a workable sample data (not an image) representing your use case and your expected result from that. For example, in your screeshot, what values do you expect?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

I've added the sample data. Also, original post already has the equation for weighted average stipend. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors