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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Allan_Zeng
Frequent Visitor

Sum Total issue

Hello Team,

 

I met an issue about sum need your support.

The data as below(Data is from database, and original data type is float):

Allan_Zeng_2-1677139805828.png

Their total shows as below instead of 0. and below result will be treated as <0 but not =0.

May I know how to settle to show the sum as 0?

Thank you in advance!

Allan_Zeng_3-1677139992466.png

 

 

1 ACCEPTED SOLUTION
MAwwad
Solution Sage
Solution Sage

 

This issue could be caused by floating-point precision errors. When adding or subtracting numbers with many decimal places, the result may not be exactly what you expect due to the limited precision of floating-point numbers.

To fix this issue, you can use the ROUND function to round the numbers to a certain number of decimal places before summing them. For example, if you want to round the numbers to two decimal places, you can use the following formula:

 

 
Total = ROUND(SUM('Table'[Value]), 2)
 

This will round each number in the "Value" column to two decimal places before summing them, which should eliminate any floating-point precision errors.

Alternatively, you can use the DECIMAL function to convert the numbers to a fixed-point decimal format with a specific number of decimal places. For example, if you want to use four decimal places, you can use the following formula:

 

 
Total = SUM(DECIMAL('Table'[Value], 18, 4))
 

This will convert each number in the "Value" column to a fixed-point decimal format with 18 total digits and 4 decimal places, and then sum them. This should also eliminate any floating-point precision errors.

I hope this helps! Let me know if you have any further questions.

View solution in original post

4 REPLIES 4
Uspace87
Resolver III
Resolver III

@Allan_Zeng  have you tried to format the column with zero decimal places

 

Uspace87_0-1677144333394.png

 

Thank you for your reminder.

I found change the data type as "Fixed decimal number" can also fix the issue.

Allan_Zeng_0-1677638376797.png

MAwwad
Solution Sage
Solution Sage

 

This issue could be caused by floating-point precision errors. When adding or subtracting numbers with many decimal places, the result may not be exactly what you expect due to the limited precision of floating-point numbers.

To fix this issue, you can use the ROUND function to round the numbers to a certain number of decimal places before summing them. For example, if you want to round the numbers to two decimal places, you can use the following formula:

 

 
Total = ROUND(SUM('Table'[Value]), 2)
 

This will round each number in the "Value" column to two decimal places before summing them, which should eliminate any floating-point precision errors.

Alternatively, you can use the DECIMAL function to convert the numbers to a fixed-point decimal format with a specific number of decimal places. For example, if you want to use four decimal places, you can use the following formula:

 

 
Total = SUM(DECIMAL('Table'[Value], 18, 4))
 

This will convert each number in the "Value" column to a fixed-point decimal format with 18 total digits and 4 decimal places, and then sum them. This should also eliminate any floating-point precision errors.

I hope this helps! Let me know if you have any further questions.

Thank you for your solution!

The fomular Total = ROUND(SUM('Table'[Value]), 2) can fix the issue.

 

While the following fomular shown below error.

Total = SUM(DECIMAL('Table'[Value], 184))

Allan_Zeng_0-1677638073552.png

 

And I found change the data type as "Fixed decimal number" can also fix the issue.

Allan_Zeng_1-1677638272466.png

Thank you again!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.