cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DJSwezey
Frequent Visitor

Rounding numbers to the nearest whole number

I have a measure that I want to have the numbers rounded to the nearest whole number. Am I missing a simple feature that will allow me to do this?

Any number whos decimal is less than 0.5 will be rounded down to the nearest whole number and any number whos decimal is 0.5 or greater will roudn up to the nearest whole number.

 

EX: 12.65 will round up to 13. 12.44 will round down to 12. 

1 ACCEPTED SOLUTION

Hi @DJSwezey ,

 

I think your issue should be caused by your data model. ROUND() function works well on myside, I couldn't reproduce your issue.

Table:

vrzhoumsft_1-1684226048533.png

vrzhoumsft_0-1684225994394.png

Please share a sample file with me, this will make it easier for me to find the solution.

 

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

7 REPLIES 7
tamerj1
Super User
Super User

Hi @DJSwezey 

This is what ROUND function is supposed to do

That's what I thought but here is an example of that not being the case.

 

DJSwezey_0-1683828976801.png

 

The left column is no rounding and the right is rounding. Works for all but the 10.98. That should be 11 not 10.

 

Im doing ROUND(sum(Showed),0)

Wilson_
Solution Specialist
Solution Specialist

Hello,

 

Do you actually need the value to be rounded or just the display to be rounded? What happens if you adjust the formatting of the showed column to show 0 decimal places?


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

I need the actual value of these to be rounded. Using these numbers in a different calculation than varies drastically based on its value. 

Hi @DJSwezey ,

 

I think your issue should be caused by your data model. ROUND() function works well on myside, I couldn't reproduce your issue.

Table:

vrzhoumsft_1-1684226048533.png

vrzhoumsft_0-1684225994394.png

Please share a sample file with me, this will make it easier for me to find the solution.

 

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.

Wilson_
Solution Specialist
Solution Specialist

Okay, I see.

 

Still, out of curiosity, what happens if you adjust the formatting of the showed column to show 0 decimal places? Does that display correctly?

@DJSwezey 

But it worked for 15.55. I guess the source of the problem is something else but not sure what it could be. 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors