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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NJ81858
Helper IV
Helper IV

Custom Total in Matrix

So I have this matrix that has rates and balances on it, inside each type I have a total, but it gives a flat rate average, when I want it to be a weighted average based on the current balance. I have this value calculated in my table, but there is nowhere to put it that it looks like a total.

Loan Int Rate Matrix.PNG

1 ACCEPTED SOLUTION

@NJ81858 Right, so as described in those articles, I generally get the measure correct for an individual row. Then, create a new measure that uses that measure for individual rows but performs a SUMMARIZE or GROUPBY for subtotal rows and grand total rows. You can use ISINSCOPE or HASONEVALUE to identify where you are in the hierarchy. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

@NJ81858 Here are two techniques for modifying the total row/aggregate row of a matrix:

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907

 

Also, MM3TR&R: Matrix Measure Total Triple Threat Rock & Roll - Microsoft Power BI Community


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Update: I did get the correct measure, it just won't show up unless there is a subtotal in there with the wrong value.

Measure.PNG

This is what I have built out for a potential weighted average, but it isn't quite correct, as it just reflects every value, rather than being an average of the value. I also am having trouble getting it to show up as a row subtotal.WA of WA.PNG

@NJ81858 Right, so as described in those articles, I generally get the measure correct for an individual row. Then, create a new measure that uses that measure for individual rows but performs a SUMMARIZE or GROUPBY for subtotal rows and grand total rows. You can use ISINSCOPE or HASONEVALUE to identify where you are in the hierarchy. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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