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
Youri98
Helper I
Helper I

Total of DAX formula doesn't add up

Hi!

 

I've got a DAX formula that looks for ID's. Each ID gets a '1' if it's found. In the picture underneath you can see that the total should add up to 3904. But in the total amount of the table it says 3892. When I exported the data I got 3904 rows, but it still said 3892. Does anyone know how this difference is possible?

Youri98_0-1744121397944.png

 

Thanks in advance!

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Youri98 First, please vote for this idea: https://community.fabric.microsoft.com/t5/Fabric-Ideas/Matrix-Table-grand-totals-with-Measures/idi-p...

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

 

Otherwise, Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



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...

View solution in original post

3 REPLIES 3
Youri98
Helper I
Helper I

Thank you @Greg_Deckler @v-karpurapud I did it with a SUMX in a different measure and I got it to work. Quite weird how this works. Think I have to look deeper into that because I still don't understand how I can get a different total when it just needs to add up '1' values. Thanks for the help!

v-karpurapud
Community Support
Community Support

Hi @Youri98 

Thank you for reaching out to the Microsoft Fabric Community Forum.
 

The issue you're experiencing with the grand total in a matrix not matching the sum of the individual row values is a known and common behavior in Power BI, especially when using measures within table or matrix visuals.
 

This happens because Power BI evaluates the total row using the same measure logic, but in a different filter context. As a result, the total may not reflect a simple aggregation of the visible rows, which can be confusing when row-level values are correct.

As a workaround, we recommend modifying your DAX measure to enforce row-level context using the SUMX() function.

If the workaround does not fully meet your needs, please note that this behavior has already been raised by a community expert @Greg_Deckler in the Power BI Ideas Froum. The suggestion is currently under review by Microsoft, as it affects many users across different scenarios.
 

We appreciate your patience while the product team investigates and considers improvements to this behavior.

If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

Thank you
 

Greg_Deckler
Community Champion
Community Champion

@Youri98 First, please vote for this idea: https://community.fabric.microsoft.com/t5/Fabric-Ideas/Matrix-Table-grand-totals-with-Measures/idi-p...

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

 

Otherwise, Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



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
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.