power query custom column round

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
702
Office Version
  1. 365
Platform
  1. Windows
what would m code be to round down to the nearest 10?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
For positive numbers, how about this one:
1604214853691.png


or this one:

1604214682882.png
 

Attachments

  • 1604214770646.png
    1604214770646.png
    22.8 KB · Views: 5
Upvote 0
for negative numbers, it depends on what you need, round towards zero or away from zero. Take -23 as an example, which one is you need, -20 or -30?
 
Upvote 0
hi
round.down worked
thanks
i had tried but seems like i did something wrong as i didnt get the same result
when i copied your work it was perfect

what does the second example do? seems like it is a more roundabout method

i havent needed negative numbers yet
 
Upvote 0
hi
round.down worked
thanks
i had tried but seems like i did something wrong as i didnt get the same result
when i copied your work it was perfect

what does the second example do? seems like it is a more roundabout method

i havent needed negative numbers yet
The second one works like this: Number.Mod(23,10) returns 3, 23-3 reruns 20.
 
Upvote 0

Forum statistics

Threads
1,223,760
Messages
6,174,341
Members
452,555
Latest member
colc007

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top