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
RilwanFlame
Helper III
Helper III

PBI summing and rounding or rounding and summing

Hi All-- 

Not sure how to fix this and will very much appreciate the help. 

In Power BI is $1.278 vs. our monthly reporting which shows $1,276 from the excel workbook where PBi is pulling the data directly from.  Im not sure if Power BI is rounding then summing vs. summing then rounding but that is just a guess. 

 

Thank you

RilwanFlame_0-1652394719876.png

 

 

 

 
 
 

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @RilwanFlame ,

 

According to your screenshot, I know the column with problem is in Whole Number Data Type or in Whole  Number Format.

Here I create a sample to have a test.

The first matrix show original data in Decimal Number Data Type and in General Format.

RicoZhou_4-1652777044484.png

The second matrix show data in Decimal Number Data Type and in Whole Number Format.

RicoZhou_2-1652777009848.png

The third matrix show data in Whole Number Data Type and in General Format.

RicoZhou_3-1652777027367.png

Result:

RicoZhou_1-1652776227437.png

We can see that in matrix one Value1 total = 27, in matrix two Value1 total should be 28, however it will still show 27 and in matrix three Value1 total is 28. So we can conclude that if we only change format (whole number) instead of data type, Power BI will sum then round the total. If we change data type (whole number), Power BI will round then sum the total.

Note: change the data type will make the data be stored differently. 

RicoZhou_0-1652776166238.png

So we can understand that modifying the format only modifies the display form of the data, while modifying the data type will directly change the data in data model.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

Hi @RilwanFlame ,

 

According to your screenshot, I know the column with problem is in Whole Number Data Type or in Whole  Number Format.

Here I create a sample to have a test.

The first matrix show original data in Decimal Number Data Type and in General Format.

RicoZhou_4-1652777044484.png

The second matrix show data in Decimal Number Data Type and in Whole Number Format.

RicoZhou_2-1652777009848.png

The third matrix show data in Whole Number Data Type and in General Format.

RicoZhou_3-1652777027367.png

Result:

RicoZhou_1-1652776227437.png

We can see that in matrix one Value1 total = 27, in matrix two Value1 total should be 28, however it will still show 27 and in matrix three Value1 total is 28. So we can conclude that if we only change format (whole number) instead of data type, Power BI will sum then round the total. If we change data type (whole number), Power BI will round then sum the total.

Note: change the data type will make the data be stored differently. 

RicoZhou_0-1652776166238.png

So we can understand that modifying the format only modifies the display form of the data, while modifying the data type will directly change the data in data model.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi Rico-  I tried playing around with it but still no luck. 

This is my value from power query 

RilwanFlame_0-1653491417634.png

but it's pulling different value under the report section 

RilwanFlame_1-1653491480153.png

 

amitchandak
Super User
Super User

@RilwanFlame , PBI does not round unless that has been done by creating a new column or adding a step in power query .

Or you formula using round before sum

 

example = sumx(table, round(Table[Value],3) )

 

You need to download this data and compare it with excel.

orCan you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Thank you for your response. That column is not using any formula. it's pulling its data directly from the workbook. 

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.

Top Solution Authors