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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lawadaa
Helper I
Helper I

grand total in table visual is not summing values correctly

Hello,

 

i have a measure where i need to multiply a percentage column with another measure . in the row level the output is correct but tabel grand total is wrong

lawadaa_0-1697965930193.png

 

new achiev measure= [overall achiev]*MIN('Agent Rate Key'[Agent Rate])

i was trying to use summarize with the columns mentioned in the table but still it's not working

3 REPLIES 3
ValtteriN
Super User
Super User

Hi,

The root cause for this behavior is that typical dax functions don't do "visual level calculations" and instead the calculation is done on filter context. In practice this means e.g. this:

Data:

ValtteriN_0-1697982230717.png

Measure:

Measure 4 = AVERAGE('Table (9)'[Value])

Now, one could think that this will result in Average of 20 since (10+30)/2 = 20. However here is the end result:
ValtteriN_1-1697982321725.png

 

So (10 + 10 + 30) / 3 = 16,67


Measure resulting in expected end result could be e.g. this:

Measure 5 =
AVERAGEX(
SUMMARIZE('Table (9)','Table (9)'[Dimension],"Average",AVERAGE('Table (9)'[Value])),[Average])

This measure first creates aggregate table and then takes average of that table resulting in the expected 20.

In your example you can use SUMX instead of AVERAGEX. So first create calculated table within your measure. Ypu can consider placing it into variable like this:

Measure 5 =
var _vtable= SUMMARIZE('Table (9)','Table (9)'[Dimension],"Average",AVERAGE('Table (9)'[Value])) return

AVERAGEX(_vtable,[Average])

In your case replace the calculated column and expression matching your table and then use SUMX.

Here is a good article on the topic by sqlbi: Summing values for the total - SQLBI


I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





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

Proud to be a Super User!




lawadaa
Helper I
Helper I

how can i use (Has one filter) funuction if i have multiple coulmns in my table?

Greg_Deckler
Community Champion
Community Champion

@lawadaa First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e

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: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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