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 September 15. Request your voucher.

Reply
PoojaG
Helper II
Helper II

Matrix returns wrong total as a result of rounding numbers.

Hello,

Is there a simpler solution for what I think is a simple problem?

Problem: I have a matrix table with three categories at row level and around 5-6 measures. For the measures where there were decimal points rounted to 0, the total is miscalculated. As an below example: Notice the last column is in decimals.

 

Department# employees% expectedActual

Sales610.424.4
Marketing30.61.8
Finance 20.61.2
HR10.20.2
Total  27.6

When I make the decimals 0, I get below: Notice the total. It should have been 27. To calculate the % I did use Sumx(Master,(# employees * % expected)). Is there a simple way of achieving this. I did follow this blog but I have way too many measures to incorporate the changes. I'm looking for a cleaner solution if that's even possible. 

Department# employees% expectedActual

Sales610.424
Marketing30.62
Finance 20.61
HR10.20
Total  28

 thank you!

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @PoojaG 

Incorporate the rounding within your sumx formula and not just in the formatting. That should be something like

Sumx(Master,round(# employees * % expected),0))





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.

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @PoojaG 

Incorporate the rounding within your sumx formula and not just in the formatting. That should be something like

Sumx(Master,round(# employees * % expected),0))





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.
lbendlin
Super User
Super User

If you want the result to be 27 then you need to implement your own integer math.

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.